Makefile (c03cf9db38e4cb783f0692f411e3e57effbe236f) Makefile (a0ffb263e02c613f9155d5035f68cb0ad7b80d74)
1CC = g++
2
3# Requirements: cpputest.github.io
4
5BTSTACK_ROOT = ../..
6
7CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include
8LDFLAGS += -lCppUTest -lCppUTestExt
9
1CC = g++
2
3# Requirements: cpputest.github.io
4
5BTSTACK_ROOT = ../..
6
7CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include
8LDFLAGS += -lCppUTest -lCppUTestExt
9
10VPATH += ${BTSTACK_ROOT}/ble
11VPATH += ${BTSTACK_ROOT}/src
10VPATH += ${BTSTACK_ROOT}/src
12VPATH += ${BTSTACK_ROOT}/platforms/posix/src
11VPATH += ${BTSTACK_ROOT}/src/ble
12VPATH += ${BTSTACK_ROOT}/platform/posix
13
14COMMON = \
13
14COMMON = \
15 utils.c \
16 btstack_memory.c \
17 memory_pool.c \
18 linked_list.c \
19 sdp_util.c \
20 remote_device_db_memory.c \
21 hci_cmds.c \
22 hci_dump.c \
23 att_dispatch.c \
24 att.c \
25 ad_parser.c \
15 ad_parser.c \
16 att_db.c \
17 att_dispatch.c \
18 btstack_linked_list.c \
19 btstack_memory.c \
26 gatt_client.c \
20 gatt_client.c \
21 hci_cmd.c \
22 hci_dump.c \
27 le_device_db_memory.c \
23 le_device_db_memory.c \
28 mock.c
24 btstack_memory_pool.c \
25 mock.c \
26 btstack_util.c \
29
30
31COMMON_OBJ = $(COMMON:.c=.o)
32
33all: gatt_client_test le_central
34
35# compile .ble description
36profile.h: profile.gatt
27
28
29COMMON_OBJ = $(COMMON:.c=.o)
30
31all: gatt_client_test le_central
32
33# compile .ble description
34profile.h: profile.gatt
37 python ${BTSTACK_ROOT}/ble/compile-gatt.py $< $@
35 python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@
38
39gatt_client_test: profile.h ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o expected_results.h
40 ${CC} ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o ${CFLAGS} ${LDFLAGS} -o $@
41
42le_central: ${CORE_OBJ} ${COMMON_OBJ} le_central.o
43 ${CC} ${CORE_OBJ} ${COMMON_OBJ} le_central.o ${CFLAGS} ${LDFLAGS} -o $@
44
45test: all
46 ./gatt_client_test
47 ./le_central
48
49clean:
50 rm -f gatt_client_test le_central
51 rm -f *.o
52 rm -rf *.dSYM
53
36
37gatt_client_test: profile.h ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o expected_results.h
38 ${CC} ${CORE_OBJ} ${COMMON_OBJ} gatt_client_test.o ${CFLAGS} ${LDFLAGS} -o $@
39
40le_central: ${CORE_OBJ} ${COMMON_OBJ} le_central.o
41 ${CC} ${CORE_OBJ} ${COMMON_OBJ} le_central.o ${CFLAGS} ${LDFLAGS} -o $@
42
43test: all
44 ./gatt_client_test
45 ./le_central
46
47clean:
48 rm -f gatt_client_test le_central
49 rm -f *.o
50 rm -rf *.dSYM
51