2014-04-10 12:52:42 +00:00
|
|
|
CC = g++
|
|
|
|
|
2015-07-03 09:18:03 +00:00
|
|
|
# Requirements: cpputest.github.io
|
2014-04-10 12:52:42 +00:00
|
|
|
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
|
2016-03-03 13:29:18 +00:00
|
|
|
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble
|
2015-05-17 16:07:24 +00:00
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
2014-04-10 12:52:42 +00:00
|
|
|
|
2015-05-14 06:25:34 +00:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
2015-11-13 14:04:41 +00:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src/ble
|
2016-01-20 13:20:47 +00:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
2015-05-14 06:25:34 +00:00
|
|
|
|
2014-04-10 12:52:42 +00:00
|
|
|
COMMON = \
|
2016-01-06 16:31:20 +00:00
|
|
|
ad_parser.c \
|
2016-02-11 20:23:06 +00:00
|
|
|
att_db.c \
|
2016-01-06 16:31:20 +00:00
|
|
|
att_dispatch.c \
|
2016-01-20 13:34:04 +00:00
|
|
|
btstack_linked_list.c \
|
2015-05-14 06:25:34 +00:00
|
|
|
btstack_memory.c \
|
2016-01-06 16:31:20 +00:00
|
|
|
gatt_client.c \
|
2016-01-21 10:33:17 +00:00
|
|
|
hci_cmd.c \
|
2015-05-14 06:25:34 +00:00
|
|
|
hci_dump.c \
|
2015-05-17 16:07:24 +00:00
|
|
|
le_device_db_memory.c \
|
2016-01-20 13:56:28 +00:00
|
|
|
btstack_memory_pool.c \
|
2016-01-06 22:02:46 +00:00
|
|
|
mock.c \
|
2016-01-20 15:10:07 +00:00
|
|
|
btstack_util.c \
|
2014-04-10 12:52:42 +00:00
|
|
|
|
2014-05-02 12:08:22 +00:00
|
|
|
|
2014-04-10 12:52:42 +00:00
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
|
|
|
|
2015-05-17 16:07:24 +00:00
|
|
|
all: gatt_client_test le_central
|
2014-04-10 12:52:42 +00:00
|
|
|
|
2014-04-11 08:50:07 +00:00
|
|
|
# compile .ble description
|
|
|
|
profile.h: profile.gatt
|
2016-04-10 19:58:19 +00:00
|
|
|
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
|
2014-04-11 08:50:07 +00:00
|
|
|
|
2015-05-17 16:07:24 +00:00
|
|
|
gatt_client_test: profile.h ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o expected_results.h
|
|
|
|
${CC} ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o ${CFLAGS} ${LDFLAGS} -o $@
|
2014-04-10 12:52:42 +00:00
|
|
|
|
2014-05-02 12:08:22 +00:00
|
|
|
le_central: ${CORE_OBJ} ${COMMON_OBJ} le_central.o
|
|
|
|
${CC} ${CORE_OBJ} ${COMMON_OBJ} le_central.o ${CFLAGS} ${LDFLAGS} -o $@
|
2014-04-28 21:09:35 +00:00
|
|
|
|
2015-07-03 09:18:03 +00:00
|
|
|
test: all
|
2015-05-17 16:07:24 +00:00
|
|
|
./gatt_client_test
|
|
|
|
./le_central
|
|
|
|
|
2014-04-10 12:52:42 +00:00
|
|
|
clean:
|
2015-05-17 16:07:24 +00:00
|
|
|
rm -f gatt_client_test le_central
|
|
|
|
rm -f *.o
|
2014-04-10 12:52:42 +00:00
|
|
|
rm -rf *.dSYM
|
|
|
|
|