summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-11-27 17:47:04 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-11-27 17:47:04 +0100
commit12cb0f04a2656eb9e1a539263e44db7b54f94337 (patch)
tree63b1f7d92634794120f579cd9eb067e3e5a35dba
parent746222bf34211e4d7fd1a8c804fea82fe6041bff (diff)
downloadeo_tokenizer-12cb0f04a2656eb9e1a539263e44db7b54f94337.zip
eo_tokenizer-12cb0f04a2656eb9e1a539263e44db7b54f94337.tar.gz
fix Makefile
-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