btstack/test/hfp/Makefile

89 lines
2.4 KiB
Makefile
Raw Normal View History

2015-08-07 19:45:00 +00:00
CC=g++
# Makefile for libusb based PTS tests
BTSTACK_ROOT = ../..
2015-11-13 14:04:41 +00:00
POSIX_ROOT= ${BTSTACK_ROOT}/platform/posix
2015-08-07 19:45:00 +00:00
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
include ${BTSTACK_ROOT}/example/Makefile.inc
2015-08-07 19:45:00 +00:00
COMMON = \
2017-05-17 21:22:05 +00:00
ad_parser.c \
sdp_server.c \
sdp_client_rfcomm.c \
btstack_link_key_db_memory.c \
2017-05-17 21:22:05 +00: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 19:45:00 +00:00
2015-08-26 16:31:31 +00:00
MOCK = \
mock.c \
test_sequences.c \
btstack_link_key_db_memory.c \
2016-01-20 15:23:34 +00:00
btstack_linked_list.c \
2015-08-26 16:31:31 +00:00
btstack_memory.c \
btstack_memory_pool.c \
btstack_util.c \
2016-01-21 10:33:17 +00:00
hci_cmd.c \
2015-08-26 16:31:31 +00:00
hci_dump.c \
sdp_util.c \
2015-08-07 19:45:00 +00:00
COMMON_OBJ = $(COMMON:.c=.o)
2015-08-26 16:31:31 +00:00
MOCK_OBJ = $(MOCK:.c=.o)
2015-08-07 19:45:00 +00:00
# CC = gcc-fsf-4.9
CFLAGS = -g -Wall -Wmissing-prototype -Wnarrowing \
2015-11-13 14:04:41 +00:00
-I. \
-I.. \
-I${BTSTACK_ROOT}/src
2015-08-07 19:45:00 +00:00
# CFLAGS += -Werror
VPATH += ${BTSTACK_ROOT}/src
2015-11-13 14:04:41 +00:00
VPATH += ${BTSTACK_ROOT}/src/classic
2016-01-20 13:20:47 +00:00
VPATH += ${BTSTACK_ROOT}/platform/posix
2015-08-07 19:45:00 +00:00
2016-09-19 13:02:59 +00:00
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/src/classic -I${POSIX_ROOT} -I${BTSTACK_ROOT}/include -I${BTSTACK_ROOT}/ble
2015-08-07 19:45:00 +00:00
LDFLAGS += -lCppUTest -lCppUTestExt
2016-08-29 21:10:32 +00:00
EXAMPLES = hfp_ag_parser_test hfp_ag_client_test hfp_hf_parser_test hfp_hf_client_test cvsd_plc_test
2015-08-07 19:45:00 +00:00
all: ${EXAMPLES}
2015-08-07 19:45:00 +00:00
clean:
rm -rf *.o $(EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM *.wav results/*
2015-08-07 19:45:00 +00:00
2016-01-08 16:16:29 +00:00
hfp_ag_parser_test: ${COMMON_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_ag_parser_test.c
2015-08-12 10:22:53 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hfp_hf_parser_test: ${COMMON_OBJ} hfp_hf.o hfp.o hfp_hf_parser_test.c
2015-08-07 19:45:00 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2015-08-20 15:06:54 +00:00
2015-08-26 16:31:31 +00:00
hfp_hf_client_test: ${MOCK_OBJ} hfp_hf.o hfp.o hfp_hf_client_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-01-08 16:16:29 +00:00
hfp_ag_client_test: ${MOCK_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_ag_client_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-09-14 15:30:47 +00:00
cvsd_plc_test: ${COMMON_OBJ} btstack_cvsd_plc.o wav_util.o cvsd_plc_test.c
2016-08-29 21:10:32 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2015-08-20 15:06:54 +00:00
test: all
mkdir -p results
2015-11-11 11:15:35 +00:00
./hfp_ag_parser_test
./hfp_ag_client_test
2015-11-11 11:15:35 +00:00
./hfp_hf_parser_test
./hfp_hf_client_test
2016-08-29 21:10:32 +00:00
./cvsd_plc_test