hammer/src/Makefile

77 lines
1 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 := \
packrat
HAMMER_PARTS := \
bitreader.o \
hammer.o \
bitwriter.o \
pprint.o \
allocator.o \
datastructures.o \
system_allocator.o \
benchmark.o \
compile.o \
$(PARSERS:%=parsers/%.o) \
$(BACKENDS:%=backends/%.o)
TESTS := t_benchmark.o \
t_bitreader.o \
t_bitwriter.o \
t_parser.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
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
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)