btstack/test/gatt_client/Makefile

51 lines
1.3 KiB
Makefile
Raw Normal View History

2014-04-10 12:52:42 +00:00
CC = g++
# 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
LDFLAGS += -lCppUTest -lCppUTestExt
2014-04-10 12:52:42 +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
2014-04-10 12:52:42 +00:00
COMMON = \
ad_parser.c \
2016-02-11 20:23:06 +00:00
att_db.c \
att_dispatch.c \
btstack_linked_list.c \
btstack_memory.c \
gatt_client.c \
2016-01-21 10:33:17 +00:00
hci_cmd.c \
hci_dump.c \
le_device_db_memory.c \
2016-01-20 13:56:28 +00:00
btstack_memory_pool.c \
mock.c \
btstack_util.c \
2014-04-10 12:52:42 +00:00
2014-04-10 12:52:42 +00:00
COMMON_OBJ = $(COMMON:.c=.o)
all: gatt_client_test le_central
2014-04-10 12:52:42 +00:00
# compile .ble description
profile.h: profile.gatt
2016-04-10 19:58:19 +00:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
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
le_central: ${CORE_OBJ} ${COMMON_OBJ} le_central.o
${CC} ${CORE_OBJ} ${COMMON_OBJ} le_central.o ${CFLAGS} ${LDFLAGS} -o $@
test: all
./gatt_client_test
./le_central
2014-04-10 12:52:42 +00:00
clean:
rm -f gatt_client_test le_central
rm -f *.o
2014-04-10 12:52:42 +00:00
rm -rf *.dSYM