xref: /btstack/test/gatt_client/Makefile (revision 3edc84c5b6b1e23a3d103fe8ce1f6b5ad1df3498)
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
11*3edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
12*3edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix/src
13cbe987fbSMatthias Ringwald
14f45e14b1S[email protected]COMMON = \
15cbe987fbSMatthias Ringwald    utils.c			            \
16cbe987fbSMatthias Ringwald    btstack_memory.c			\
17cbe987fbSMatthias Ringwald    memory_pool.c			    \
18cbe987fbSMatthias Ringwald    linked_list.c			    \
19cbe987fbSMatthias Ringwald    hci_cmds.c					\
20cbe987fbSMatthias Ringwald    hci_dump.c     				\
21cbe987fbSMatthias Ringwald    att_dispatch.c       	    \
22cbe987fbSMatthias Ringwald    att.c     					\
23cbe987fbSMatthias Ringwald    ad_parser.c                 \
24cbe987fbSMatthias Ringwald    gatt_client.c               \
2557fe2af8SMatthias Ringwald    le_device_db_memory.c       \
26f45e14b1S[email protected]    mock.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
35*3edc84c5SMatthias 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]