1f45e14b1S[email protected]CC = g++ 2f45e14b1S[email protected] 3f45e14b1S[email protected]# Requirements: http://www.cpputest.org/ should be placed in btstack/test 4f45e14b1S[email protected] 5f45e14b1S[email protected]BTSTACK_ROOT = ../.. 6f45e14b1S[email protected]CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest 7f45e14b1S[email protected] 8f45e14b1S[email protected]CFLAGS = -DUNIT_TEST -g -Wall -I. -I${BTSTACK_ROOT}/example/libusb -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include -I$(CPPUTEST_HOME)/include 9f45e14b1S[email protected]LDFLAGS += -L$(CPPUTEST_HOME) -lCppUTest -lCppUTestExt 10f45e14b1S[email protected] 11f45e14b1S[email protected]COMMON = \ 12f45e14b1S[email protected] ${BTSTACK_ROOT}/src/utils.c \ 13f45e14b1S[email protected] ${BTSTACK_ROOT}/src/btstack_memory.c \ 14f45e14b1S[email protected] ${BTSTACK_ROOT}/src/memory_pool.c \ 15f45e14b1S[email protected] ${BTSTACK_ROOT}/src/linked_list.c \ 16f45e14b1S[email protected] ${BTSTACK_ROOT}/src/sdp_util.c \ 17f45e14b1S[email protected] ${BTSTACK_ROOT}/src/remote_device_db_memory.c \ 18f45e14b1S[email protected] ${BTSTACK_ROOT}/src/run_loop.c \ 19f45e14b1S[email protected] ${BTSTACK_ROOT}/src/run_loop_posix.c \ 20f45e14b1S[email protected] ${BTSTACK_ROOT}/src/hci_cmds.c \ 21f45e14b1S[email protected] ${BTSTACK_ROOT}/example/libusb/ble_client.c \ 22*4d890b2dS[email protected] ${BTSTACK_ROOT}/ble/att.c \ 23f45e14b1S[email protected] mock.c 24f45e14b1S[email protected] 25f45e14b1S[email protected]COMMON_OBJ = $(COMMON:.c=.o) 26f45e14b1S[email protected] 27f45e14b1S[email protected]all: gatt_client 28f45e14b1S[email protected] 29*4d890b2dS[email protected]# compile .ble description 30*4d890b2dS[email protected]profile.h: profile.gatt 31*4d890b2dS[email protected] python ${BTSTACK_ROOT}/ble/compile-gatt.py $< $@ 32*4d890b2dS[email protected] 33*4d890b2dS[email protected]gatt_client: ${CORE_OBJ} ${COMMON_OBJ} gatt_client.c profile.h 34f45e14b1S[email protected] ${CC} ${CORE_OBJ} ${COMMON_OBJ} gatt_client.c ${CFLAGS} ${LDFLAGS} -o $@ 35f45e14b1S[email protected] 36f45e14b1S[email protected]clean: 37f45e14b1S[email protected] rm -f gatt_client 38f45e14b1S[email protected] rm -f *.o ${BTSTACK_ROOT}/src/*.o 39f45e14b1S[email protected] rm -rf *.dSYM 40f45e14b1S[email protected]