btstack/test/gatt_client/Makefile

46 lines
1.5 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
2014-04-10 12:52:42 +00:00
LDFLAGS += -L$(CPPUTEST_HOME) -lCppUTest -lCppUTestExt
COMMON = \
${BTSTACK_ROOT}/src/utils.c \
${BTSTACK_ROOT}/src/btstack_memory.c \
${BTSTACK_ROOT}/src/memory_pool.c \
${BTSTACK_ROOT}/src/linked_list.c \
${BTSTACK_ROOT}/src/sdp_util.c \
${BTSTACK_ROOT}/src/remote_device_db_memory.c \
${BTSTACK_ROOT}/src/hci_cmds.c \
${BTSTACK_ROOT}/src/hci.c \
${BTSTACK_ROOT}/src/hci_dump.c \
2014-04-29 19:45:40 +00:00
${BTSTACK_ROOT}/ble/att_dispatch.c \
${BTSTACK_ROOT}/ble/att.c \
2014-04-29 19:45:40 +00:00
${BTSTACK_ROOT}/ble/ad_parser.c \
${BTSTACK_ROOT}/ble/gatt_client.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 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: ${CORE_OBJ} ${COMMON_OBJ} gatt_client.o profile.h expected_results.h
${CC} ${CORE_OBJ} ${COMMON_OBJ} gatt_client.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 $@
2014-04-10 12:52:42 +00:00
clean:
rm -f gatt_client le_central
rm -f *.o ${BTSTACK_ROOT}/src/*.o ${BTSTACK_ROOT}/ble/*.o
2014-04-10 12:52:42 +00:00
rm -rf *.dSYM