Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
 
2
.PHONY: all clean
3
 
4
#
5
# HOSTNAME must be "Linux" or "MS-DOS"
6
#
7
 
8
HOSTNAME=$(shell uname)
9
 
10
#
11
#
12
#
13
 
14
ifeq ($(HOSTNAME),Linux)
15
LDFLAGS=-lncurses
16
CFLAGS=-DUSE_NCURSES
17
OBJ_EXT=.o
18
EXE_EXT=
19
else
20
ifeq ($(HOSTNAME),MS-DOS)
21
CFLAGS=-DUSE_CONIO
22
OBJ_EXT=.o
23
EXE_EXT=.exe
24
%.exe: %.o
25
	gcc -O2 -s -o $@ $?
26
else
27
all::
28
	@echo System "$(HOSTNAME)" unknow
29
	@echo Try to modify the first line of makefile
30
	@false
31
endif
32
endif
33
 
34
#
35
#
36
#
37
 
38
CC=gcc
39
CFLAGS+=-Wall -O2 -s
40
 
41
all:: clean hconf$(EXE_EXT)
42
	@echo ...
43
	@echo ...
44
	@echo esempio di uso del programma:
45
	@echo hconf -m config.in
46
 
47
clean:
48
	rm -f *$(OBJ_EXT)
49
	rm -f hconf$(EXE_EXT)
50
 
51
hconf$(EXE_EXT): hconf$(OBJ_EXT) parse$(OBJ_EXT) \
52
	show$(OBJ_EXT) write$(OBJ_EXT) read$(OBJ_EXT) token$(OBJ_EXT)
53
 
54
hconf$(OBJ_EXT): hconf.c
55
parse$(OBJ_EXT): parse.c
56
show$(OBJ_EXT): show.c
57
write$(OBJ_EXT): write.c
58
read$(OBJ_EXT): write.c
59
token(OBJ_EXT): token.c
60
 
61