aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-01-17 00:20:06 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-01-17 00:20:06 +0100
commit649ade4fb2c588355e89aa060b4d5954f77579e5 (patch)
tree337943cf7e23069bcbfac4a973dee0a59784a0ba /Makefile
parentFix memory leak. (diff)
downloadcalp-649ade4fb2c588355e89aa060b4d5954f77579e5.tar.gz
calp-649ade4fb2c588355e89aa060b4d5954f77579e5.tar.xz
Further work.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index ce41926b..439b496b 100644
--- a/Makefile
+++ b/Makefile
@@ -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