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