diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-01-17 00:20:06 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-01-17 00:20:06 +0100 |
commit | 649ade4fb2c588355e89aa060b4d5954f77579e5 (patch) | |
tree | 337943cf7e23069bcbfac4a973dee0a59784a0ba /Makefile | |
parent | Fix memory leak. (diff) | |
download | calp-649ade4fb2c588355e89aa060b4d5954f77579e5.tar.gz calp-649ade4fb2c588355e89aa060b4d5954f77579e5.tar.xz |
Further work.
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 |