2015-08-07 21:45:00 +02:00
|
|
|
CC=g++
|
|
|
|
|
|
|
|
# Makefile for libusb based PTS tests
|
|
|
|
BTSTACK_ROOT = ../..
|
2015-11-13 15:04:41 +01:00
|
|
|
POSIX_ROOT= ${BTSTACK_ROOT}/platform/posix
|
2015-08-07 21:45:00 +02:00
|
|
|
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
|
|
|
|
2016-02-19 09:46:37 +01:00
|
|
|
include ${BTSTACK_ROOT}/example/Makefile.inc
|
2015-12-02 10:51:57 +01:00
|
|
|
|
2015-08-07 21:45:00 +02:00
|
|
|
COMMON = \
|
2016-02-07 00:16:04 +01:00
|
|
|
sdp_server.c \
|
2016-03-17 11:24:38 +01:00
|
|
|
sdp_client_rfcomm.c \
|
2016-02-03 21:55:36 +01:00
|
|
|
btstack_link_key_db_memory.c \
|
2016-01-20 16:23:34 +01:00
|
|
|
btstack_linked_list.c \
|
2015-08-07 21:45:00 +02:00
|
|
|
btstack_memory.c \
|
2016-01-20 16:23:34 +01:00
|
|
|
btstack_memory_pool.c \
|
|
|
|
btstack_run_loop.c \
|
|
|
|
btstack_run_loop_posix.c \
|
|
|
|
btstack_util.c \
|
2015-08-07 21:45:00 +02:00
|
|
|
hci.c \
|
2016-01-21 11:33:17 +01:00
|
|
|
hci_cmd.c \
|
2015-08-07 21:45:00 +02:00
|
|
|
hci_dump.c \
|
|
|
|
l2cap.c \
|
|
|
|
l2cap_signaling.c \
|
2016-01-06 17:31:20 +01:00
|
|
|
rfcomm.c \
|
2015-08-07 21:45:00 +02:00
|
|
|
sdp_client.c \
|
2016-01-06 17:31:20 +01:00
|
|
|
sdp_util.c \
|
2015-08-07 21:45:00 +02:00
|
|
|
|
|
|
|
|
2015-08-26 18:31:31 +02:00
|
|
|
MOCK = \
|
2016-01-06 17:31:20 +01:00
|
|
|
mock.c \
|
|
|
|
test_sequences.c \
|
2016-02-03 21:55:36 +01:00
|
|
|
btstack_link_key_db_memory.c \
|
2016-01-20 16:23:34 +01:00
|
|
|
btstack_linked_list.c \
|
2015-08-26 18:31:31 +02:00
|
|
|
btstack_memory.c \
|
2016-02-03 21:55:36 +01:00
|
|
|
btstack_memory_pool.c \
|
|
|
|
btstack_util.c \
|
2016-01-21 11:33:17 +01:00
|
|
|
hci_cmd.c \
|
2015-08-26 18:31:31 +02:00
|
|
|
hci_dump.c \
|
|
|
|
sdp_util.c \
|
2015-09-23 16:58:34 +02:00
|
|
|
|
2015-08-07 21:45:00 +02:00
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
2015-08-26 18:31:31 +02:00
|
|
|
MOCK_OBJ = $(MOCK:.c=.o)
|
2015-08-07 21:45:00 +02:00
|
|
|
|
|
|
|
# CC = gcc-fsf-4.9
|
2016-03-03 14:26:11 +01:00
|
|
|
CFLAGS = -g -Wall -Wmissing-prototype -Wnarrowing \
|
2015-11-13 15:04:41 +01:00
|
|
|
-I. \
|
|
|
|
-I.. \
|
|
|
|
-I${BTSTACK_ROOT}/src
|
2015-08-07 21:45:00 +02:00
|
|
|
# CFLAGS += -Werror
|
|
|
|
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
2015-11-13 15:04:41 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src/classic
|
2016-01-20 14:20:47 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
2015-08-07 21:45:00 +02:00
|
|
|
|
|
|
|
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include -I${BTSTACK_ROOT}/ble
|
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
|
2015-11-11 12:15:35 +01:00
|
|
|
EXAMPLES = hfp_ag_parser_test hfp_ag_client_test hfp_hf_parser_test hfp_hf_client_test
|
2015-08-07 21:45:00 +02:00
|
|
|
|
2016-01-31 20:31:52 +01:00
|
|
|
all: ${EXAMPLES}
|
2015-08-07 21:45:00 +02:00
|
|
|
|
|
|
|
clean:
|
2015-11-11 15:45:35 +01:00
|
|
|
rm -rf *.o $(EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM
|
2015-08-07 21:45:00 +02:00
|
|
|
|
2016-01-08 17:16:29 +01:00
|
|
|
hfp_ag_parser_test: ${COMMON_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_ag_parser_test.c
|
2015-08-12 12:22:53 +02:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
|
|
|
hfp_hf_parser_test: ${COMMON_OBJ} hfp_hf.o hfp.o hfp_hf_parser_test.c
|
2015-08-07 21:45:00 +02:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
2015-08-20 17:06:54 +02:00
|
|
|
|
2015-08-26 18:31:31 +02:00
|
|
|
hfp_hf_client_test: ${MOCK_OBJ} hfp_hf.o hfp.o hfp_hf_client_test.c
|
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2016-01-08 17:16:29 +01:00
|
|
|
hfp_ag_client_test: ${MOCK_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_ag_client_test.c
|
2015-09-23 16:58:34 +02:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2015-08-20 17:06:54 +02:00
|
|
|
test: all
|
2015-11-11 12:15:35 +01:00
|
|
|
./hfp_ag_parser_test
|
2015-09-23 16:58:34 +02:00
|
|
|
./hfp_ag_client_test
|
2015-11-11 12:15:35 +01:00
|
|
|
./hfp_hf_parser_test
|
|
|
|
./hfp_hf_client_test
|
2015-09-23 16:58:34 +02:00
|
|
|
|