btstack/test/pts/Makefile

217 lines
8.2 KiB
Makefile
Raw Normal View History

2015-06-12 22:28:20 +02:00
# Makefile for libusb based PTS tests
BTSTACK_ROOT = ../..
2017-04-04 11:26:04 +02:00
CORE += \
btstack_memory.c \
btstack_linked_list.c \
btstack_memory_pool.c \
btstack_run_loop.c \
btstack_util.c \
2018-07-20 16:47:56 +02:00
btstack_audio.c \
btstack_audio_portaudio.c \
2017-04-04 11:55:09 +02:00
main.c \
btstack_stdin_posix.c \
2017-12-13 16:52:44 +01:00
btstack_tlv.c \
btstack_tlv_posix.c \
2017-04-04 11:26:04 +02:00
COMMON += \
hci.c \
device_id_server.c \
2017-12-13 16:52:44 +01:00
ad_parser.c \
2017-04-04 11:26:04 +02:00
hci_cmd.c \
hci_dump.c \
l2cap.c \
l2cap_signaling.c \
2017-12-13 16:52:44 +01:00
rfcomm.c \
2017-04-04 11:55:09 +02:00
hci_transport_h2_libusb.c \
btstack_run_loop_posix.c \
btstack_link_key_db_fs.c \
le_device_db_fs.c \
wav_util.c \
2017-04-04 11:26:04 +02:00
sdp_util.c \
2017-04-04 11:55:09 +02:00
sdp_server.c \
2017-07-12 16:35:01 +02:00
sdp_client.c \
2017-12-13 16:52:44 +01:00
sdp_client_rfcomm.c \
2017-07-10 22:12:01 +02:00
sm.c \
uECC.c \
2017-12-13 16:52:44 +01:00
spp_server.c \
2017-07-10 22:12:01 +02:00
2017-12-13 16:52:44 +01:00
ATT += \
att_dispatch.c \
GATT_SERVER += \
att_db.c \
att_server.c \
2018-04-26 13:46:34 +02:00
battery_service_server.c \
device_information_service_server.c \
2017-12-13 16:52:44 +01:00
GATT_CLIENT += \
gatt_client.c \
SM += \
sm.c \
2015-06-12 22:28:20 +02:00
2017-04-04 11:55:09 +02:00
SBC_DECODER += \
${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \
${BTSTACK_ROOT}/src/classic/btstack_sbc_decoder_bluedroid.c \
2017-04-04 11:55:09 +02:00
SBC_ENCODER += \
${BTSTACK_ROOT}/src/classic/btstack_sbc_encoder_bluedroid.c \
2017-04-04 11:55:09 +02:00
${BTSTACK_ROOT}/src/classic/hfp_msbc.c \
AVDTP += \
2017-12-13 16:52:44 +01:00
avdtp_util.c \
avdtp.c \
avdtp_initiator.c \
avdtp_acceptor.c \
avdtp_source.c \
avdtp_sink.c \
a2dp_source.c \
a2dp_sink.c \
btstack_ring_buffer.c \
# include ${BTSTACK_ROOT}/example/Makefile.inc
HXCMOD_PLAYER = \
${BTSTACK_ROOT}/3rd-party/hxcmod-player/hxcmod.c \
${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods/nao-deceased_by_disease.c \
include ${BTSTACK_ROOT}/example/Makefile.inc
2017-04-04 11:55:09 +02:00
include ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc
include ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc
2015-06-12 22:28:20 +02:00
2017-12-13 16:52:44 +01:00
CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-variable -Wunused-parameter
CFLAGS += -D ENABLE_TESTING_SUPPORT
CFLAGS += -D ENABLE_LE_SIGNED_WRITE
# CFLAGS += -I..
2017-04-04 11:26:04 +02:00
CFLAGS += -I${BTSTACK_ROOT}/src
CFLAGS += -I${BTSTACK_ROOT}/src/classic
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include -D OI_DEBUG
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include
2017-12-13 16:52:44 +01:00
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/eCC
2018-03-26 21:52:25 +02:00
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/tinydir
2017-04-04 11:26:04 +02:00
CFLAGS += -I${BTSTACK_ROOT}/platform/posix
CFLAGS += -I${BTSTACK_ROOT}/platform/embedded
CFLAGS += -I${BTSTACK_ROOT}/port/libusb
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/tinydir
2015-06-12 22:28:20 +02:00
2017-04-04 11:26:04 +02:00
VPATH += ${BTSTACK_ROOT}/src
2017-12-13 16:52:44 +01:00
VPATH += ${BTSTACK_ROOT}/src/ble
2018-04-26 13:46:34 +02:00
VPATH += ${BTSTACK_ROOT}/src/gatt-service
2017-12-13 16:52:44 +01:00
VPATH += ${BTSTACK_ROOT}/src/ble/mesh
2017-04-04 11:26:04 +02:00
VPATH += ${BTSTACK_ROOT}/src/classic
2016-01-20 14:20:47 +01:00
VPATH += ${BTSTACK_ROOT}/platform/posix
2017-04-04 11:26:04 +02:00
VPATH += ${BTSTACK_ROOT}/platform/libusb
2015-11-13 15:04:41 +01:00
VPATH += ${BTSTACK_ROOT}/port/libusb
2017-04-04 11:28:51 +02:00
VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce
VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce
2017-12-13 16:52:44 +01:00
VPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
2015-06-12 22:28:20 +02:00
# use pkg-config for libusb
2015-08-13 20:55:21 +02:00
CFLAGS += $(shell pkg-config libusb-1.0 --cflags)
LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
# use pkg-config for portaudio
2017-04-04 11:28:51 +02:00
CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
2017-04-04 11:55:09 +02:00
CORE_OBJ = $(CORE:.c=.o)
COMMON_OBJ = $(COMMON:.c=.o)
2017-12-13 16:52:44 +01:00
ATT_OBJ = $(ATT:.c=.o)
SM_OBJ = $(SM:.c=.o) $(MICROECC:.c=.o)
GATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o)
GATT_SERVER_OBJ = $(GATT_SERVER:.c=.o)
2017-04-04 11:55:09 +02:00
SBC_DECODER_OBJ = $(SBC_DECODER:.c=.o)
SBC_ENCODER_OBJ = $(SBC_ENCODER:.c=.o)
AVDTP_OBJ = $(AVDTP:.c=.o)
HXCMOD_PLAYER_OBJ = ${HXCMOD_PLAYER:.c=.o}
2017-12-13 16:52:44 +01:00
EXAMPLES = iopt ble_peripheral_test ble_central_test l2cap_test classic_test bnep_test hsp_ag_test hsp_hs_test sco_loopback le_data_channel
2018-10-03 09:43:29 +02:00
EXAMPLES += avdtp_source_test avdtp_sink_test avrcp_controller_test sm_test avrcp_target_test gatt_profiles hrp_col_test hrp_server_test
EXAMPLES += hog_demo_test hid_device_test hid_host_test
2015-06-12 22:28:20 +02:00
all: ${EXAMPLES}
2015-06-12 22:28:20 +02:00
hid_host_test: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_hid_parser.o hid_host_test.o
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hid_device_test: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_ring_buffer.o hid_device.o hid_device_test.o
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hog_demo_test: hog_demo_test.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} battery_service_server.o device_information_service_server.o hids_device.o btstack_ring_buffer.o hog_demo_test.c
${CC} $(filter-out hog_demo_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2018-05-04 23:46:13 +02:00
hrp_server_test.h: hrp_server_test.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
hrp_server_test: hrp_server_test.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} heart_rate_service_server.o hrp_server_test.c
${CC} $(filter-out hrp_server_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2018-05-04 16:03:05 +02:00
hrp_col_test: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} hrp_col_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
avrcp_target_test: ${CORE_OBJ} ${COMMON_OBJ} ${SBC_ENCODER_OBJ} ${SM_OBJ} ${AVDTP_OBJ} ${HXCMOD_PLAYER_OBJ} sdp_client.o avrcp.o avrcp_media_item_iterator.o avrcp.o avrcp_target.o avrcp_browsing_target.o btstack_stdin_pts.o avrcp_target_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
avrcp_controller_test: ${CORE_OBJ} ${COMMON_OBJ} ${SBC_DECODER_OBJ} ${SM_OBJ} ${SBC_ENCODER_OBJ} ${AVDTP_OBJ} sdp_client.o avrcp.o avrcp_media_item_iterator.o avrcp_controller.o avrcp_browsing_controller.o btstack_stdin_pts.o avrcp_controller_test.o
2017-06-14 14:32:51 +02:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2017-05-19 19:51:31 +02:00
avdtp_sink_test: ${CORE_OBJ} ${COMMON_OBJ} ${SBC_DECODER_OBJ} ${SM_OBJ} ${SBC_ENCODER_OBJ} ${AVDTP_OBJ} avdtp_sink_test.o
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
avdtp_source_test: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ${SBC_ENCODER_OBJ} ${AVDTP_OBJ} avdtp_source_test.o
2017-04-04 11:28:51 +02:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
ble_peripheral_test.h: ble_peripheral_test.gatt
2016-04-10 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2017-04-04 11:55:09 +02:00
ble_central_test.h: ble_central_test.gatt
2016-04-10 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2018-04-26 15:50:35 +02:00
ble_peripheral_test: ble_peripheral_test.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} ble_peripheral_test.o
${CC} $(filter-out ble_peripheral_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2016-10-26 12:53:21 +02:00
ble_central_test: ble_central_test.h ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ad_parser.o ble_central_test.c
${CC} $(filter-out ble_central_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2015-06-12 22:28:20 +02:00
2018-04-26 13:46:34 +02:00
gatt_profiles.h: gatt_profiles.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2016-10-26 12:53:21 +02:00
le_data_channel: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ${ATT_OBJ} ad_parser.o le_data_channel.c
2016-07-08 16:48:52 +02:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2015-06-12 22:28:20 +02:00
hsp_ag_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_ag.o hsp_ag_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
hsp_hs_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_hs.o hsp_hs_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
l2cap_test: ${CORE_OBJ} ${COMMON_OBJ} l2cap_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
classic_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} classic_test.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2017-12-13 16:52:44 +01:00
bnep_test: ${CORE_OBJ} ${COMMON_OBJ} bnep.o pan.o bnep_test.c
2015-06-12 22:28:20 +02:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2015-11-12 12:22:50 +01:00
sco_loopback: ${CORE_OBJ} ${COMMON_OBJ} sco_loopback.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2015-11-25 16:01:35 +01:00
2018-08-03 22:20:28 +02:00
iopt: ${CORE_OBJ} ${COMMON_OBJ} pan.o hsp_ag.o hsp_hs.o hfp_ag.o hfp_hf.o hfp_gsm_model.o iopt.c hfp.o a2dp_sink.o a2dp_source.o ${AVDTP_OBJ} avrcp_controller.o avrcp_target.o avrcp.o ${SDP_CLIENT}
2015-11-25 16:01:35 +01:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2017-04-04 11:28:51 +02:00
sm_test: sm_test.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} sm_test.o
${CC} $(filter-out sm_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2018-04-26 13:46:34 +02:00
gatt_profiles.h: gatt_profiles.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
gatt_profiles: gatt_profiles.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} gatt_profiles.o
${CC} $(filter-out gatt_profiles.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2017-07-24 16:51:09 +02:00
myclean:
rm -rf *.pyc *.o $(AVDTP_TESTS) *.dSYM *_test *.wav *.sbc ${BTSTACK_ROOT}/port/libusb/*.o ${BTSTACK_ROOT}/src/*.o ${BTSTACK_ROOT}/src/classic/*.o ${BTSTACK_ROOT}/src/ble/*.o hog_demo_test.h
2017-07-24 16:51:09 +02:00
clean: myclean