btstack/test/gatt_client/Makefile

55 lines
1.4 KiB
Makefile
Raw Normal View History

2014-04-10 12:52:42 +00:00
CC = g++
# Requirements: http://www.cpputest.org/ should be placed in btstack/test
BTSTACK_ROOT = ../..
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
2014-11-28 16:08:08 +00:00
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include -I$(CPPUTEST_HOME)/include
LDFLAGS += -lCppUTest -lCppUTestExt
# -L$(CPPUTEST_HOME)
2014-04-10 12:52:42 +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 = \
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 \
le_device_db_memory.c \
2014-04-10 12:52:42 +00:00
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
python ${BTSTACK_ROOT}/ble/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:
./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