51 lines
1.2 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 = ../..
2018-06-26 13:40:35 +02:00
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src
LDFLAGS += -lCppUTest -lCppUTestExt
2014-04-10 12:52:42 +00: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
2014-04-10 12:52:42 +00:00
COMMON = \
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 \
gatt_client.c \
2019-03-30 21:30:47 +01:00
hci_cmd.c \
hci_dump.c \
le_device_db_memory.c \
mock.c \
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 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
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 $@
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
2018-06-26 13:40:35 +02:00