btstack/test/hfp/Makefile

94 lines
2.6 KiB
Makefile
Raw Normal View History

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
include ${BTSTACK_ROOT}/example/Makefile.inc
2015-08-07 21:45:00 +02:00
COMMON = \
2017-05-17 23:22:05 +02:00
ad_parser.c \
sdp_server.c \
sdp_client_rfcomm.c \
btstack_link_key_db_memory.c \
2017-05-17 23:22:05 +02:00
btstack_linked_list.c \
btstack_memory.c \
btstack_memory_pool.c \
btstack_run_loop.c \
btstack_run_loop_posix.c \
btstack_util.c \
hci.c \
hci_cmd.c \
hci_dump.c \
l2cap.c \
l2cap_signaling.c \
rfcomm.c \
sdp_client.c \
sdp_util.c \
2015-08-07 21:45:00 +02:00
2015-08-26 18:31:31 +02:00
MOCK = \
mock.c \
test_sequences.c \
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 \
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-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
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 -Wmissing-prototypes -Wnarrowing
# CFLAGS += -Werror
CFLAGS += -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/src/classic -I${POSIX_ROOT} -I${BTSTACK_ROOT}/include
2018-12-20 11:49:32 +01:00
# CFLAGS += -D OCTAVE_OUTPUT
# CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address
LDFLAGS_CPPUTEST += -lCppUTest -lCppUTestExt
2015-08-07 21:45:00 +02:00
EXAMPLES = hfp_at_parser_test hfp_ag_client_test hfp_hf_client_test cvsd_plc_test pklg_cvsd_test
2015-08-07 21:45:00 +02:00
all: ${EXAMPLES}
2015-08-07 21:45:00 +02:00
clean:
rm -rf *.o $(EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM *.wav results/* pklg/*.wav
rm -f *.gcno *.gcda
2015-08-07 21:45:00 +02:00
hfp_at_parser_test: ${COMMON_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_at_parser_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS_CPPUTEST} -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_CPPUTEST} -o $@
2015-08-26 18:31:31 +02:00
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
${CC} $^ ${CFLAGS} ${LDFLAGS_CPPUTEST} -o $@
2016-09-14 17:30:47 +02:00
cvsd_plc_test: ${COMMON_OBJ} btstack_cvsd_plc.o wav_util.o cvsd_plc_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS_CPPUTEST} -o $@
2016-08-29 23:10:32 +02:00
pklg_cvsd_test: hci_dump.o btstack_util.o btstack_cvsd_plc.o wav_util.o pklg_cvsd_test.o
${CC} $^ ${CFLAGS} -o $@
2015-08-20 17:06:54 +02:00
test: all
mkdir -p results
./hfp_at_parser_test
./hfp_ag_client_test
2015-11-11 12:15:35 +01:00
./hfp_hf_client_test
2016-08-29 23:10:32 +02:00
./cvsd_plc_test
pklg-test: pklg_cvsd_test
./pklg_cvsd_test pklg/test1
./pklg_cvsd_test pklg/test2
./pklg_cvsd_test pklg/test3
./pklg_cvsd_test pklg/test4
2018-12-17 15:13:56 +01:00
./pklg_cvsd_test pklg/test5