btstack/test/hfp/Makefile

86 lines
2.2 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/embedded/Makefile.inc
2015-08-07 19:45:00 +00:00
COMMON = \
sdp.c \
sdp_query_rfcomm.c \
btstack_linked_list.c \
2015-08-07 19:45:00 +00:00
btstack_memory.c \
hci.c \
hci_cmds.c \
hci_dump.c \
l2cap.c \
l2cap_signaling.c \
2016-01-20 13:56:28 +00:00
btstack_memory_pool.c \
2015-08-07 19:45:00 +00:00
remote_device_db_memory.c \
rfcomm.c \
run_loop.c \
2016-01-20 14:38:37 +00:00
btstack_run_loop_posix.c \
2015-08-07 19:45:00 +00:00
sdp_client.c \
sdp_parser.c \
sdp_query_util.c \
sdp_util.c \
utils.c \
2015-08-07 19:45:00 +00:00
2015-08-26 16:31:31 +00:00
MOCK = \
mock.c \
test_sequences.c \
btstack_linked_list.c \
2015-08-26 16:31:31 +00:00
btstack_memory.c \
hci_cmds.c \
hci_dump.c \
2016-01-20 13:56:28 +00:00
btstack_memory_pool.c \
remote_device_db_memory.c \
2015-08-26 16:31:31 +00:00
sdp_util.c \
utils.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
2015-11-13 14:04:41 +00:00
CFLAGS = -g -Wall \
-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
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include -I${BTSTACK_ROOT}/ble
LDFLAGS += -lCppUTest -lCppUTestExt
2015-11-11 11:15:35 +00:00
EXAMPLES = hfp_ag_parser_test hfp_ag_client_test hfp_hf_parser_test hfp_hf_client_test
2015-08-07 19:45:00 +00:00
2015-10-15 14:33:34 +00:00
all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES}
2015-08-07 19:45:00 +00:00
clean:
2015-11-11 14:45:35 +00:00
rm -rf *.o $(EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM
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 $@
2015-08-20 15:06:54 +00:00
test: all
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