]> git.notmuchmail.org Git - notmuch/blob - test/Makefile.local
test/hex-xcode: new test binary
[notmuch] / test / Makefile.local
1 # -*- makefile -*-
2
3 dir := test
4
5 extra_cflags += -I.
6
7 smtp_dummy_srcs =               \
8         $(notmuch_compat_srcs)  \
9         $(dir)/smtp-dummy.c
10
11 smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
12
13 $(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a
14         $(call quiet,CC) -I. $^ -o $@
15
16 $(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libutil.a
17         $(call quiet,CC) -I. $^ -o $@ -ltalloc
18
19 $(dir)/smtp-dummy: $(smtp_dummy_modules)
20         $(call quiet,CC) $^ -o $@
21
22 $(dir)/symbol-test: $(dir)/symbol-test.o
23         $(call quiet,CXX) $^ -o $@ -Llib -lnotmuch $(XAPIAN_LDFLAGS)
24
25 $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o
26         $(call quiet,CC) $^ -o $@
27
28 .PHONY: test check
29
30 TEST_BINARIES=$(dir)/arg-test \
31               $(dir)/hex-xcode \
32               $(dir)/parse-time \
33               $(dir)/smtp-dummy \
34               $(dir)/symbol-test
35
36 test-binaries: $(TEST_BINARIES)
37
38 test:   all test-binaries
39         @${dir}/notmuch-test $(OPTIONS)
40
41 check: test
42
43 SRCS := $(SRCS) $(smtp_dummy_srcs)
44 CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o \
45          $(dir)/symbol-test $(dir)/symbol-test.o \
46          $(dir)/arg-test $(dir)/arg-test.o \
47          $(dir)/hex-xcode $(dir)/hex-xcode.o \
48          $(dir)/parse-time $(dir)/parse-time.o \
49          $(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.*