summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 7a2f3c3..359aeb0 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
CC = gcc
CFLAGS = -ggdb3 `pkg-config --cflags --libs eina`
BIN = eo_tokenizer
-SRC = main.c eo_tokenizer.c
+SRC = main.c eo_tokenizer.c eo_definitions.c
LOG = EINA_LOG_LEVELS=eo_toknz:4
.PHONY: clean
@@ -15,13 +15,13 @@ LOG = EINA_LOG_LEVELS=eo_toknz:4
ragel -x -o $@ $<
.rl.dot:
- ragel -V -p -S eo_tokenizer -o $@ $<
+ ragel -V -p -S eo_tokenizer $< -o $@
.dot.png:
dot -Tpng >$@ $<
.c.o:
- $(CC) -c -Wall -I. $(CFLAGS) -D$(STD) -o $@ $<
+ $(CC) -c -Wall -I. $(CFLAGS) $< -o $@
all: $(BIN)
@@ -30,7 +30,12 @@ eo_tokenizer.xml: eo_tokenizer.rl
eo_tokenizer.dot: eo_tokenizer.rl
eo_tokenizer.png: eo_tokenizer.dot
-eo_tokenizer: main.c eo_tokenizer.c eo_tokenizer.h
+eo_definitions.o: eo_definitions.c eo_definitions.h
+eo_tokenizer.o: eo_tokenizer.c eo_tokenizer.h eo_definitions.h
+main.o: main.c eo_tokenizer.h
+
+eo_tokenizer: main.o eo_tokenizer.o eo_definitions.o
+ $(CC) -Wall -I. $(CFLAGS) main.o eo_tokenizer.o eo_definitions.o -o $@
test: eo_tokenizer
$(LOG) ./eo_tokenizer ./data/*.c