comparison Makefile @ 190:70b0f1f9e039

Setup test harness (Catch), integrate into build system.
author Lucas Thompson <dev@lucas.im>
date Tue, 07 Feb 2017 11:07:17 +0000
parents 3eb00e5c76c4
children 94bab7bfbc78
comparison
equal deleted inserted replaced
189:6859f35cb4f8 190:70b0f1f9e039
8 #LDFLAGS := -L$(VAMPSDK_DIR) -L/usr/local/lib -lvamp-hostsdk -lcapnp -lkj 8 #LDFLAGS := -L$(VAMPSDK_DIR) -L/usr/local/lib -lvamp-hostsdk -lcapnp -lkj
9 LDFLAGS := $(VAMPSDK_DIR)/libvamp-hostsdk.a -lcapnp -lkj 9 LDFLAGS := $(VAMPSDK_DIR)/libvamp-hostsdk.a -lcapnp -lkj
10 10
11 LDFLAGS += -ldl 11 LDFLAGS += -ldl
12 12
13 all: o bin bin/piper-convert bin/piper-vamp-simple-server 13 TEST_SRCS := test/vamp-client/tst_PluginStub.cpp
14
15 all: o bin bin/piper-convert bin/piper-vamp-simple-server bin/test-suite
14 16
15 bin: 17 bin:
16 mkdir bin 18 mkdir bin
17 19
18 o: 20 o:
21 bin/piper-convert: o/convert.o o/json11.o o/piper.capnp.o 23 bin/piper-convert: o/convert.o o/json11.o o/piper.capnp.o
22 c++ $(CXXFLAGS) $^ -o $@ $(LDFLAGS) 24 c++ $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
23 25
24 bin/piper-vamp-simple-server: o/simple-server.o o/json11.o o/piper.capnp.o 26 bin/piper-vamp-simple-server: o/simple-server.o o/json11.o o/piper.capnp.o
25 c++ $(CXXFLAGS) $^ -o $@ $(LDFLAGS) 27 c++ $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
28
29 bin/test-suite: test/main.cpp $(TEST_SRCS)
30 c++ $(CXXFLAGS) $(INCFLAGS) $< $(TEST_SRCS) -o $@ $(LDFLAGS)
26 31
27 o/piper.capnp.o: vamp-capnp/piper.capnp.c++ 32 o/piper.capnp.o: vamp-capnp/piper.capnp.c++
28 c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@ 33 c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@
29 34
30 vamp-capnp/piper.capnp.h: vamp-capnp/piper.capnp.c++ 35 vamp-capnp/piper.capnp.h: vamp-capnp/piper.capnp.c++
40 45
41 o/simple-server.o: vamp-server/simple-server.cpp vamp-capnp/piper.capnp.h vamp-capnp/VampnProto.h vamp-json/VampJson.h 46 o/simple-server.o: vamp-server/simple-server.cpp vamp-capnp/piper.capnp.h vamp-capnp/VampnProto.h vamp-json/VampJson.h
42 c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@ 47 c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@
43 48
44 test: all 49 test: all
50 bin/test-suite
45 vamp-server/test.sh 51 vamp-server/test.sh
46 52
47 clean: 53 clean:
48 rm -f */*.o 54 rm -f */*.o
49 55
50 distclean: clean 56 distclean: clean
51 rm -f bin/* 57 rm -rf bin/*
52 58
53 # cancel implicit rule which otherwise could try to link %.capnp 59 # cancel implicit rule which otherwise could try to link %.capnp
54 %: %.o 60 %: %.o