Subversion Repositories shark

Rev

Rev 2 | Blame | Compare with Previous | Last modification | View Log | RSS feed


.PHONY: all clean

#
# HOSTNAME must be "Linux" or "MS-DOS"
#

HOSTNAME=$(shell uname)

#
#
#

ifeq ($(HOSTNAME),Linux)
LDFLAGS=-lncurses
CFLAGS=-DUSE_NCURSES
OBJ_EXT=.o
EXE_EXT=
else
ifeq ($(HOSTNAME),MS-DOS)
CFLAGS=-DUSE_CONIO
OBJ_EXT=.o
EXE_EXT=.exe
%.exe: %.o
        gcc -O2 -s -o $@ $?
else
all:: 
        @echo System "$(HOSTNAME)" unknow
        @echo Try to modify the first line of makefile
        @false
endif
endif

#
#
#

CC=gcc
CFLAGS+=-Wall -O2 -s

all:: clean hconf$(EXE_EXT)
        @echo ...
        @echo ...
        @echo esempio di uso del programma:
        @echo hconf -m config.in

clean:
        rm -f *$(OBJ_EXT)
        rm -f hconf$(EXE_EXT)

hconf$(EXE_EXT): hconf$(OBJ_EXT) parse$(OBJ_EXT) \
        show$(OBJ_EXT) write$(OBJ_EXT) read$(OBJ_EXT) token$(OBJ_EXT)

hconf$(OBJ_EXT): hconf.c
parse$(OBJ_EXT): parse.c
show$(OBJ_EXT): show.c
write$(OBJ_EXT): write.c
read$(OBJ_EXT): write.c
token(OBJ_EXT): token.c