1f9739491SMatthias RingwaldCC = g++ 2f9739491SMatthias Ringwald 3f9739491SMatthias Ringwald# Requirements: cpputest.github.io 4f9739491SMatthias Ringwald 5f9739491SMatthias RingwaldBTSTACK_ROOT = ../.. 6f9739491SMatthias Ringwald 7*ae970bb9SMilanka RingwaldCFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ 8*ae970bb9SMilanka RingwaldCFLAGS += -I${BTSTACK_ROOT}/src 9*ae970bb9SMilanka RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/rijndael 1028b5b606SMatthias RingwaldCFLAGS += -fprofile-arcs -ftest-coverage 11f9739491SMatthias RingwaldLDFLAGS += -lCppUTest -lCppUTestExt 12f9739491SMatthias Ringwald 13f9739491SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src 14f9739491SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble 151a449638SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble/gatt-service 16f9739491SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix 17*ae970bb9SMilanka RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/rijndael 18f9739491SMatthias Ringwald 19f9739491SMatthias RingwaldCOMMON = \ 20f9739491SMatthias Ringwald ad_parser.c \ 21f9739491SMatthias Ringwald att_db.c \ 22*ae970bb9SMilanka Ringwald att_db_util.c \ 23f9739491SMatthias Ringwald att_dispatch.c \ 24*ae970bb9SMilanka Ringwald att_server.c \ 25*ae970bb9SMilanka Ringwald battery_service_server.c \ 26*ae970bb9SMilanka Ringwald btstack_crypto.c \ 27f9739491SMatthias Ringwald btstack_linked_list.c \ 28f9739491SMatthias Ringwald btstack_memory.c \ 29f9739491SMatthias Ringwald btstack_memory_pool.c \ 30f9739491SMatthias Ringwald btstack_tlv.c \ 31*ae970bb9SMilanka Ringwald btstack_util.c \ 321a449638SMatthias Ringwald cycling_power_service_server.c \ 331a449638SMatthias Ringwald cycling_speed_and_cadence_service_server.c \ 341a449638SMatthias Ringwald device_information_service_server.c \ 35*ae970bb9SMilanka Ringwald hci_cmd.c \ 36*ae970bb9SMilanka Ringwald hci_dump.c \ 371a449638SMatthias Ringwald heart_rate_service_server.c \ 381a449638SMatthias Ringwald hids_device.c \ 39*ae970bb9SMilanka Ringwald le_device_db_memory.c \ 40*ae970bb9SMilanka Ringwald mock.c \ 411a449638SMatthias Ringwald nordic_spp_service_server.c \ 42*ae970bb9SMilanka Ringwald rijndael.c \ 431a449638SMatthias Ringwald ublox_spp_service_server.c \ 44f9739491SMatthias Ringwald 45f9739491SMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o) 46f9739491SMatthias Ringwald 47f9739491SMatthias Ringwaldall: gatt_server_test 48f9739491SMatthias Ringwald 49f9739491SMatthias Ringwald# compile .ble description 50f9739491SMatthias Ringwaldprofile.h: profile.gatt 51f9739491SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 52f9739491SMatthias Ringwald 53f9739491SMatthias Ringwaldgatt_server_test: profile.h ${COMMON_OBJ} gatt_server_test.o 54f9739491SMatthias Ringwald ${CC} ${COMMON_OBJ} gatt_server_test.o ${CFLAGS} ${LDFLAGS} -o $@ 55f9739491SMatthias Ringwald 56f9739491SMatthias Ringwaldtest: all 57f9739491SMatthias Ringwald ./gatt_server_test 58f9739491SMatthias Ringwald 59f9739491SMatthias Ringwaldclean: 60f9739491SMatthias Ringwald rm -f gatt_server_test 61f9739491SMatthias Ringwald rm -f *.o 62f9739491SMatthias Ringwald rm -rf *.dSYM 63f9739491SMatthias Ringwald rm -f *.gcno *.gcda 64f9739491SMatthias Ringwald 65