diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -1,3 +1,5 @@ +.PHONY: all clean + CC := gcc LEX := flex @@ -5,14 +7,18 @@ CFLAGS = -Wall -ggdb #LFLAGS = #LDFLAGS = -#%.yy.c : %.yy -# $(LEX) -o $@ ${LFLAGS} $< +C_FILES = $(wildcard *.c) +O_FILES = $(C_FILES:.c=.o) +H_FILES = $(wildcard *.h) -%.o : %.c - $(CC) -c -o $@ $^ ${CFLAGS} +all: parse -parse: parse.o - $(CC) -o $@ $^ ${LDFLAGS} +%.o : %.c $(H_FILES) + $(CC) -c -o $@ $< ${CFLAGS} -test: test.yy.o +parse: $(O_FILES) $(CC) -o $@ $^ ${LDFLAGS} + +clean: + -rm parse + -rm *.o |