hammer/src/Makefile

91 lines
1.2 KiB
Makefile
Raw Normal View History

2012-05-26 16:00:43 +02:00
PARSERS := \
unimplemented \
bits \
token \
whitespace \
ignoreseq \
2012-05-26 16:00:43 +02:00
ch \
action \
charset \
int_range \
sequence \
choice \
nothing \
end \
butnot \
difference \
many \
xor \
optional \
ignore \
epsilon \
and \
2012-05-26 16:05:01 +02:00
not \
2012-06-01 20:00:10 +02:00
attr_bool \
indirect
2012-05-26 16:00:43 +02:00
BACKENDS := \
2013-04-17 15:10:33 +02:00
packrat \
llk \
2013-06-04 22:14:06 +02:00
lalr \
2013-03-09 21:42:49 -08:00
regex
HAMMER_PARTS := \
bitreader.o \
hammer.o \
bitwriter.o \
pprint.o \
allocator.o \
desugar.o \
datastructures.o \
system_allocator.o \
benchmark.o \
cfgrammar.o \
2013-02-17 15:24:13 +01:00
glue.o \
backends/lr.o \
backends/lr0.o \
$(PARSERS:%=parsers/%.o) \
$(BACKENDS:%=backends/%.o)
TESTS := t_benchmark.o \
t_bitreader.o \
t_bitwriter.o \
t_parser.o \
t_grammar.o \
2013-01-07 23:44:26 +01:00
t_misc.o \
test_suite.o
OUTPUTS := libhammer.a \
2012-10-10 15:58:03 +02:00
test_suite.o \
2012-05-26 16:00:43 +02:00
test_suite \
$(HAMMER_PARTS) \
$(TESTS)
2012-04-30 23:35:11 +01:00
TOPLEVEL := ../
include ../common.mk
$(TESTS): CFLAGS += $(TEST_CFLAGS)
$(TESTS): LDFLAGS += $(TEST_LDFLAGS)
2012-04-30 23:35:11 +01:00
CFLAGS += -fPIC
2012-10-10 16:45:10 +02:00
all: libhammer.a
libhammer.a: $(HAMMER_PARTS)
bitreader.o: test_suite.h
2012-05-11 23:35:21 +01:00
hammer.o: hammer.h
2013-02-17 15:24:13 +01:00
glue.o: hammer.h glue.h
all: libhammer.a
test: test_suite
./test_suite -v
2012-10-10 16:45:10 +02:00
test_suite: $(TESTS) libhammer.a
$(call hush, "Linking $@") $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
2013-05-23 23:26:22 +02:00
backends/regex.o: backends/regex_debug.c