btstack/example/Makefile.inc

244 lines
8.1 KiB
PHP
Raw Normal View History

2016-07-08 17:11:57 +02:00
2014-11-15 16:36:16 +00:00
VPATH += ${BTSTACK_ROOT}/src
2015-11-13 15:04:41 +01:00
VPATH += ${BTSTACK_ROOT}/src/ble
VPATH += ${BTSTACK_ROOT}/src/ble/gatt-service
2015-11-13 15:04:41 +01:00
VPATH += ${BTSTACK_ROOT}/src/classic
VPATH += ${BTSTACK_ROOT}/example
VPATH += ${BTSTACK_ROOT}/3rd-party/mbedtls/library
2016-10-03 12:02:54 +02:00
VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce
VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder//srce
2014-11-15 16:36:16 +00:00
CFLAGS += -I.
2015-11-13 15:04:41 +01:00
CFLAGS += -I${BTSTACK_ROOT}/src/ble
CFLAGS += -I${BTSTACK_ROOT}/src/classic
2014-11-15 16:36:16 +00:00
CFLAGS += -I${BTSTACK_ROOT}/src
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include
2016-10-03 12:02:54 +02:00
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include
2016-09-27 12:25:14 +02:00
2016-10-03 12:02:54 +02:00
CFLAGS += -I${BTSTACK_ROOT}/test/security_manager
2014-11-15 16:36:16 +00:00
2016-09-27 12:25:14 +02:00
# for CVSD/SBC PLC
LDFLAGS += -lm
2014-11-15 16:36:16 +00:00
CORE += \
btstack_memory.c \
btstack_linked_list.c \
btstack_memory_pool.c \
btstack_run_loop.c \
btstack_util.c \
2014-11-15 16:36:16 +00:00
COMMON += \
hci.c \
hci_cmd.c \
hci_dump.c \
l2cap.c \
l2cap_signaling.c \
CLASSIC += \
btstack_link_key_db_memory.c \
sdp_util.c \
spp_server.c \
rfcomm.c \
bnep.c \
sdp_server.c \
2014-11-15 17:06:55 +00:00
SDP_CLIENT += \
sdp_client.o \
sdp_client_rfcomm.o \
2014-11-15 16:36:16 +00:00
ATT += \
att_dispatch.c \
2014-11-15 16:36:16 +00:00
GATT_SERVER += \
att_db.c \
att_server.c \
2014-11-15 16:36:16 +00:00
GATT_CLIENT += \
ad_parser.c \
gatt_client.c \
2014-11-15 16:36:16 +00:00
2016-10-19 16:02:06 +02:00
SM += \
2014-11-15 16:36:16 +00:00
sm.c \
PAN += \
pan.c \
MBEDTLS = \
bignum.c \
ecp.c \
ecp_curves.c \
sm_mbedtls_allocator.c \
memory_buffer_alloc.c \
2016-06-01 10:43:47 +02:00
platform.c \
2016-10-03 12:02:54 +02:00
# List of files for Bluedroid SBC codec
include ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc
include ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc
2016-07-08 17:11:57 +02:00
SBC_DECODER += \
btstack_sbc_plc.c \
btstack_sbc_bludroid.c \
2016-07-08 17:11:57 +02:00
2016-07-22 17:32:44 +02:00
SBC_ENCODER += \
btstack_sbc_bludroid.c \
hfp_msbc.c \
2016-07-22 17:32:44 +02:00
2016-09-19 14:40:47 +02:00
CVSD_PLC = \
btstack_cvsd_plc.c \
2016-09-19 14:40:47 +02:00
2014-11-15 16:36:16 +00:00
EXAMPLES = \
ancs_client_demo \
2014-11-15 16:36:16 +00:00
gap_dedicated_bonding \
gap_inquiry \
gatt_battery_query \
gatt_browser \
2015-04-23 23:32:24 +02:00
le_counter \
le_streamer \
le_streamer_client \
2015-04-23 23:32:24 +02:00
led_counter \
2014-11-15 16:36:16 +00:00
sdp_bnep_query \
sdp_general_query \
sdp_rfcomm_query \
spp_and_le_counter \
spp_counter \
spp_streamer \
gap_le_advertisements \
hfp_ag_demo \
hfp_hf_demo \
hsp_ag_demo \
hsp_hs_demo \
sm_pairing_peripheral \
sm_pairing_central \
2014-11-15 16:36:16 +00:00
EXAMPLES_USING_LE = \
ancs_client_demo \
gatt_battery_query \
gatt_browser \
le_counter \
le_streamer \
le_streamer_client \
spp_and_le_counter \
gap_le_advertisements \
sm_pairing_peripheral \
sm_pairing_central \
2014-11-15 16:36:16 +00:00
# .o for .c
CORE_OBJ = $(CORE:.c=.o)
COMMON_OBJ = $(COMMON:.c=.o)
CLASSIC_OBJ = $(CLASSIC:.c=.o)
2016-10-19 16:02:06 +02:00
SM_OBJ = $(SM:.c=.o) $(MBEDTLS:.c=.o)
2014-11-15 16:36:16 +00:00
ATT_OBJ = $(ATT:.c=.o)
GATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o)
GATT_SERVER_OBJ = $(GATT_SERVER:.c=.o)
PAN_OBJ = $(PAN:.c=.o)
2016-07-08 17:11:57 +02:00
SBC_DECODER_OBJ = $(SBC_DECODER:.c=.o)
SBC_ENCODER_OBJ = $(SBC_ENCODER:.c=.o)
2016-09-19 14:40:47 +02:00
CVSD_PLC_OBJ = $(CVSD_PLC:.c=.o)
2014-11-15 16:36:16 +00:00
default_target: all
# compile .gatt descriptions
profile.h: profile.gatt
2016-04-10 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
ancs_client_demo.h: ancs_client_demo.gatt
2016-04-10 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2014-11-15 16:36:16 +00:00
spp_and_le_counter.h: spp_and_le_counter.gatt
2016-04-10 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2015-04-23 23:32:24 +02:00
le_counter.h: le_counter.gatt
2016-04-10 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
le_streamer.h: le_streamer.gatt
2016-04-10 21:58:19 +02:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2016-06-10 10:21:46 +02:00
sm_pairing_peripheral.h: sm_pairing_peripheral.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2014-11-15 16:36:16 +00:00
# examples
sdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
sdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_general_query.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
sdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_bnep_query.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
spp_counter: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
le_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} battery_service_server.o le_counter.c
2015-04-23 23:32:24 +02:00
${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2016-10-19 16:02:06 +02:00
sm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} sm_pairing_peripheral.c
2016-06-10 10:21:46 +02:00
${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2016-10-19 16:02:06 +02:00
sm_pairing_central: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ad_parser.o sm_pairing_central.o
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-06-10 11:03:59 +02:00
2016-10-19 16:02:06 +02:00
le_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} le_streamer.c
${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
le_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} le_streamer_client.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-10-19 16:02:06 +02:00
spp_and_le_counter: spp_and_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} spp_and_le_counter.c
2014-11-15 16:36:16 +00:00
${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
spp_counter_ssp: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter_ssp.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
spp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_streamer.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
gap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_dedicated_bonding.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
gap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ad_parser.o gap_inquiry.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
panu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} panu_demo.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-10-19 16:02:06 +02:00
gatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} gatt_browser.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-10-19 16:02:06 +02:00
gatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} gatt_battery_query.c
2014-11-15 16:36:16 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-10-19 16:02:06 +02:00
ancs_client_demo: ancs_client_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} ancs_client.c ancs_client_demo.c
${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2014-11-15 16:36:16 +00:00
led_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c
2015-03-06 11:52:55 +00:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
gap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2016-10-19 15:04:10 +02:00
hsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hsp_hs.o hsp_hs_demo.c
2016-09-19 14:40:47 +02:00
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
2016-01-14 12:15:30 +01:00
2016-10-19 15:04:10 +02:00
hsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hsp_ag.o hsp_ag_demo.c
2016-09-19 14:40:47 +02:00
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
2016-03-18 16:17:01 +01:00
2016-10-19 15:04:10 +02:00
hfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c
2016-09-19 14:40:47 +02:00
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
2016-03-18 17:00:59 +01:00
2016-10-19 15:04:10 +02:00
hfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hfp.o hfp_hf.o hfp_hf_demo.c
2016-09-19 14:40:47 +02:00
${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@
2016-03-18 17:00:59 +01:00
2014-11-15 16:36:16 +00:00
clean:
rm -f ${EXAMPLES}
2016-02-15 21:07:35 +01:00
rm -f *.o *.out *.hex *.exe
rm -f ancs_client_demo.h profile.h spp_and_le_counter.h le_counter.h le_streamer.h
2014-11-15 16:36:16 +00:00
rm -rf *.dSYM
2014-12-12 08:42:35 +00:00
rm -rf ${BTSTACK_ROOT}/src/*.o
rm -rf ${BTSTACK_ROOT}/src/ble/*.o
rm -rf ${BTSTACK_ROOT}/src/ble/gatt-service/*.o
rm -rf ${BTSTACK_ROOT}/example/*.o
rm -rf ${BTSTACK_ROOT}/example/ancs_client_demo.h
rm -rf ${BTSTACK_ROOT}/example/profile.h
rm -rf ${BTSTACK_ROOT}/example/spp_and_le_counter.h
rm -rf ${BTSTACK_ROOT}/example/le_counter.h
rm -rf ${BTSTACK_ROOT}/example/le_streamer.h
2014-11-15 16:36:16 +00:00