xref: /btstack/test/gatt_server/Makefile (revision f97394917c3b1935c260bd05ff48b4262744e5a4)
1*f9739491SMatthias RingwaldCC = g++
2*f9739491SMatthias Ringwald
3*f9739491SMatthias Ringwald# Requirements: cpputest.github.io
4*f9739491SMatthias Ringwald
5*f9739491SMatthias RingwaldBTSTACK_ROOT =  ../..
6*f9739491SMatthias Ringwald
7*f9739491SMatthias RingwaldCFLAGS  = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src
8*f9739491SMatthias RingwaldCFLAGS += -fprofile-arcs -ftest-coverage
9*f9739491SMatthias RingwaldLDFLAGS +=  -lCppUTest -lCppUTestExt
10*f9739491SMatthias Ringwald
11*f9739491SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
12*f9739491SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
13*f9739491SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix
14*f9739491SMatthias Ringwald
15*f9739491SMatthias RingwaldCOMMON = \
16*f9739491SMatthias Ringwald	ad_parser.c                 \
17*f9739491SMatthias Ringwald	att_server.c                \
18*f9739491SMatthias Ringwald	att_db.c                    \
19*f9739491SMatthias Ringwald	att_dispatch.c              \
20*f9739491SMatthias Ringwald	btstack_linked_list.c       \
21*f9739491SMatthias Ringwald	btstack_memory.c            \
22*f9739491SMatthias Ringwald	btstack_memory_pool.c       \
23*f9739491SMatthias Ringwald	btstack_util.c              \
24*f9739491SMatthias Ringwald	hci_cmd.c                   \
25*f9739491SMatthias Ringwald	hci_dump.c                  \
26*f9739491SMatthias Ringwald	le_device_db_memory.c       \
27*f9739491SMatthias Ringwald	mock.c                      \
28*f9739491SMatthias Ringwald	btstack_tlv.c               \
29*f9739491SMatthias Ringwald
30*f9739491SMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o)
31*f9739491SMatthias Ringwald
32*f9739491SMatthias Ringwaldall: gatt_server_test
33*f9739491SMatthias Ringwald
34*f9739491SMatthias Ringwald# compile .ble description
35*f9739491SMatthias Ringwaldprofile.h: profile.gatt
36*f9739491SMatthias Ringwald	python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
37*f9739491SMatthias Ringwald
38*f9739491SMatthias Ringwaldgatt_server_test: profile.h ${COMMON_OBJ} gatt_server_test.o
39*f9739491SMatthias Ringwald	${CC} ${COMMON_OBJ} gatt_server_test.o ${CFLAGS} ${LDFLAGS} -o $@
40*f9739491SMatthias Ringwald
41*f9739491SMatthias Ringwaldtest: all
42*f9739491SMatthias Ringwald	./gatt_server_test
43*f9739491SMatthias Ringwald
44*f9739491SMatthias Ringwaldclean:
45*f9739491SMatthias Ringwald	rm -f  gatt_server_test
46*f9739491SMatthias Ringwald	rm -f  *.o
47*f9739491SMatthias Ringwald	rm -rf *.dSYM
48*f9739491SMatthias Ringwald	rm -f *.gcno *.gcda
49*f9739491SMatthias Ringwald
50