From 013625545c75dd63e62dc4470b5b90ac428e735d Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Sat, 23 Nov 2013 02:05:05 +0000 Subject: initial commit: support C/C++ comments --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..949524c --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ + +CC = gcc +CFLAGS = -ggdb3 `pkg-config --cflags --libs eina` +BIN = eo_tokenizer +SRC = main.c eo_tokenizer.c + +.PHONY: clean +.SUFFIXES: .rl .xml .dot .png + +.rl.c: + ragel -s -o $@ $< + +.rl.xml: + ragel -x -o $@ $< + +.rl.dot: + ragel -V -p -S eo_tokenizer -o $@ $< + +.dot.png: + dot -Tpng >$@ $< + +.c.o: + $(CC) -c -Wall -I. $(CFLAGS) -D$(STD) -o $@ $< + +all: $(BIN) + +eo_tokenizer.c: eo_tokenizer.rl +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 + +test-comments: eo_tokenizer + EINA_LOG_LEVELS=eo_toknz:4 ./eo_tokenizer ./data/comments.c + +clean: + rm -f *~ *.o *.dot *.png *.xml $(BIN).c $(BIN) + -- cgit v1.2.3