xref: /btstack/test/gatt_client/Makefile (revision 9796ebea28b5fda4477d2867a657ae5010a68fe2)
1f45e14b1S[email protected]CC = g++
2f45e14b1S[email protected]
38e8dfe94SMatthias Ringwald# Requirements: cpputest.github.io
4f45e14b1S[email protected]
5f45e14b1S[email protected]BTSTACK_ROOT =  ../..
6f45e14b1S[email protected]
78e8dfe94SMatthias RingwaldCFLAGS  = -DUNIT_TEST -x c++ -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include
857fe2af8SMatthias RingwaldLDFLAGS +=  -lCppUTest -lCppUTestExt
9f45e14b1S[email protected]
10cbe987fbSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
113edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
123edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix/src
13cbe987fbSMatthias Ringwald
14f45e14b1S[email protected]COMMON = \
15a484130cSMatthias Ringwald    ad_parser.c                 \
16a484130cSMatthias Ringwald    att.c     					\
17a484130cSMatthias Ringwald    att_dispatch.c       	    \
18a484130cSMatthias Ringwald    bk_linked_list.c		    \
19cbe987fbSMatthias Ringwald    btstack_memory.c			\
20a484130cSMatthias Ringwald    gatt_client.c               \
21cbe987fbSMatthias Ringwald    hci_cmds.c					\
22cbe987fbSMatthias Ringwald    hci_dump.c     				\
2357fe2af8SMatthias Ringwald    le_device_db_memory.c       \
24a484130cSMatthias Ringwald    memory_pool.c			    \
25*9796ebeaSMatthias Ringwald    mock.c                      \
26a484130cSMatthias Ringwald    utils.c			            \
27f45e14b1S[email protected]
287bdc6798S[email protected]
29f45e14b1S[email protected]COMMON_OBJ = $(COMMON:.c=.o)
30f45e14b1S[email protected]
3157fe2af8SMatthias Ringwaldall: gatt_client_test le_central
32f45e14b1S[email protected]
334d890b2dS[email protected]# compile .ble description
344d890b2dS[email protected]profile.h: profile.gatt
353edc84c5SMatthias Ringwald	python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@
364d890b2dS[email protected]
3757fe2af8SMatthias Ringwaldgatt_client_test: profile.h ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o expected_results.h
3857fe2af8SMatthias Ringwald	${CC} ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o ${CFLAGS} ${LDFLAGS} -o $@
39f45e14b1S[email protected]
407bdc6798S[email protected]le_central: ${CORE_OBJ} ${COMMON_OBJ} le_central.o
417bdc6798S[email protected]	${CC} ${CORE_OBJ} ${COMMON_OBJ} le_central.o ${CFLAGS} ${LDFLAGS} -o $@
42ee988ca9S[email protected]
438e8dfe94SMatthias Ringwaldtest: all
4457fe2af8SMatthias Ringwald	./gatt_client_test
4557fe2af8SMatthias Ringwald	./le_central
4657fe2af8SMatthias Ringwald
47f45e14b1S[email protected]clean:
4857fe2af8SMatthias Ringwald	rm -f  gatt_client_test le_central
4957fe2af8SMatthias Ringwald	rm -f  *.o
50f45e14b1S[email protected]	rm -rf *.dSYM
51f45e14b1S[email protected]