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 = ../..
|
|
|
|
|
2015-07-03 09:18:03 +00:00
|
|
|
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include
|
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}/ble
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
|
|
|
VPATH += ${BTSTACK_ROOT}/platforms/posix/src
|
|
|
|
|
2014-04-10 12:52:42 +00:00
|
|
|
COMMON = \
|
2015-05-14 06:25:34 +00:00
|
|
|
utils.c \
|
|
|
|
btstack_memory.c \
|
|
|
|
memory_pool.c \
|
|
|
|
linked_list.c \
|
|
|
|
sdp_util.c \
|
|
|
|
remote_device_db_memory.c \
|
|
|
|
hci_cmds.c \
|
|
|
|
hci_dump.c \
|
|
|
|
att_dispatch.c \
|
|
|
|
att.c \
|
|
|
|
ad_parser.c \
|
|
|
|
gatt_client.c \
|
2015-05-17 16:07:24 +00:00
|
|
|
le_device_db_memory.c \
|
2014-04-10 12:52:42 +00:00
|
|
|
mock.c
|
|
|
|
|
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
|
|
|
|
python ${BTSTACK_ROOT}/ble/compile-gatt.py $< $@
|
|
|
|
|
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
|
|
|
|
|