hammer/src/Makefile

73 lines
943 B
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
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
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
2012-10-10 16:45:10 +02:00
ifneq ($(INCLUDE_TESTS),0)
all: test_suite
test: test_suite
./test_suite -v
2012-10-10 16:45:10 +02:00
test_suite: test_suite.o $(TESTS) libhammer.a
2012-10-10 16:45:10 +02:00
$(call hush, "Linking $@") $(CC) -o $@ $^ $(LDFLAGS)
endif