1fcb08cdbSMilanka Ringwald 2bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src 3bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble 4fe5451faSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble/gatt-service 5bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic 6bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/example 7faccbb29SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/mbedtls/library 80e5ac34fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce 90e5ac34fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder//srce 10bcf00d8fSMatthias Ringwald 11bcf00d8fSMatthias RingwaldCFLAGS += -I. 12bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/ble 13bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/classic 14bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src 15faccbb29SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include 160e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include 170e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include 1840e13339SMatthias Ringwald 190e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/test/security_manager 20bcf00d8fSMatthias Ringwald 2140e13339SMatthias Ringwald# for CVSD/SBC PLC 2240e13339SMatthias RingwaldLDFLAGS += -lm 2340e13339SMatthias Ringwald 24bcf00d8fSMatthias RingwaldCORE += \ 25bcf00d8fSMatthias Ringwald btstack_memory.c \ 26bcf00d8fSMatthias Ringwald btstack_linked_list.c \ 27bcf00d8fSMatthias Ringwald btstack_memory_pool.c \ 28bcf00d8fSMatthias Ringwald btstack_run_loop.c \ 29bcf00d8fSMatthias Ringwald btstack_util.c \ 30bcf00d8fSMatthias Ringwald 31bcf00d8fSMatthias RingwaldCOMMON += \ 32bcf00d8fSMatthias Ringwald hci.c \ 33bcf00d8fSMatthias Ringwald hci_cmd.c \ 34bcf00d8fSMatthias Ringwald hci_dump.c \ 35bcf00d8fSMatthias Ringwald l2cap.c \ 36bcf00d8fSMatthias Ringwald l2cap_signaling.c \ 373a18db10SMatthias Ringwald 383a18db10SMatthias RingwaldCLASSIC += \ 39bcf00d8fSMatthias Ringwald btstack_link_key_db_memory.c \ 40bcf00d8fSMatthias Ringwald sdp_util.c \ 41efda0b48SMatthias Ringwald spp_server.c \ 42bcf00d8fSMatthias Ringwald rfcomm.c \ 43bcf00d8fSMatthias Ringwald bnep.c \ 44bcf00d8fSMatthias Ringwald sdp_server.c \ 45c4b3290dSMatthias Ringwald device_id_server.c \ 46bcf00d8fSMatthias Ringwald 47bcf00d8fSMatthias RingwaldSDP_CLIENT += \ 48bcf00d8fSMatthias Ringwald sdp_client.o \ 49efda0b48SMatthias Ringwald sdp_client_rfcomm.o \ 50bcf00d8fSMatthias Ringwald 51bcf00d8fSMatthias RingwaldATT += \ 52bcf00d8fSMatthias Ringwald att_dispatch.c \ 53bcf00d8fSMatthias Ringwald 54bcf00d8fSMatthias RingwaldGATT_SERVER += \ 55bcf00d8fSMatthias Ringwald att_db.c \ 56bcf00d8fSMatthias Ringwald att_server.c \ 57bcf00d8fSMatthias Ringwald 58bcf00d8fSMatthias RingwaldGATT_CLIENT += \ 59bcf00d8fSMatthias Ringwald ad_parser.c \ 60bcf00d8fSMatthias Ringwald gatt_client.c \ 61bcf00d8fSMatthias Ringwald 625b9c6aadSMatthias RingwaldSM += \ 63bcf00d8fSMatthias Ringwald sm.c \ 64bcf00d8fSMatthias Ringwald 65bcf00d8fSMatthias RingwaldPAN += \ 66bcf00d8fSMatthias Ringwald pan.c \ 67bcf00d8fSMatthias Ringwald 68faccbb29SMatthias RingwaldMBEDTLS = \ 69faccbb29SMatthias Ringwald bignum.c \ 70faccbb29SMatthias Ringwald ecp.c \ 71faccbb29SMatthias Ringwald ecp_curves.c \ 7268437d83SMatthias Ringwald sm_mbedtls_allocator.c \ 73d3bd9600SMatthias Ringwald memory_buffer_alloc.c \ 746643eff8SMatthias Ringwald platform.c \ 75faccbb29SMatthias Ringwald 760e5ac34fSMatthias Ringwald# List of files for Bluedroid SBC codec 770e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc 780e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc 79fcb08cdbSMilanka Ringwald 80fcb08cdbSMilanka RingwaldSBC_DECODER += \ 81cd7b9db2SMatthias Ringwald btstack_sbc_plc.c \ 82cd7b9db2SMatthias Ringwald btstack_sbc_bludroid.c \ 83fcb08cdbSMilanka Ringwald 844f0d422dSMilanka RingwaldSBC_ENCODER += \ 85cd7b9db2SMatthias Ringwald btstack_sbc_bludroid.c \ 86cd7b9db2SMatthias Ringwald hfp_msbc.c \ 874f0d422dSMilanka Ringwald 88fbc7c9f2SMilanka RingwaldCVSD_PLC = \ 89cd7b9db2SMatthias Ringwald btstack_cvsd_plc.c \ 90fbc7c9f2SMilanka Ringwald 91fbc7c9f2SMilanka Ringwald 92bcf00d8fSMatthias RingwaldEXAMPLES = \ 93bcf00d8fSMatthias Ringwald ancs_client_demo \ 94bcf00d8fSMatthias Ringwald gap_dedicated_bonding \ 95bcf00d8fSMatthias Ringwald gap_inquiry \ 96bcf00d8fSMatthias Ringwald gatt_battery_query \ 97bcf00d8fSMatthias Ringwald gatt_browser \ 98bcf00d8fSMatthias Ringwald le_counter \ 99bcf00d8fSMatthias Ringwald le_streamer \ 100c8f97be6SMatthias Ringwald le_streamer_client \ 101bcf00d8fSMatthias Ringwald led_counter \ 102bcf00d8fSMatthias Ringwald sdp_bnep_query \ 103bcf00d8fSMatthias Ringwald sdp_general_query \ 104bcf00d8fSMatthias Ringwald sdp_rfcomm_query \ 105bcf00d8fSMatthias Ringwald spp_and_le_counter \ 106bcf00d8fSMatthias Ringwald spp_counter \ 107bcf00d8fSMatthias Ringwald spp_streamer \ 108bcf00d8fSMatthias Ringwald gap_le_advertisements \ 109fffdd288SMatthias Ringwald hfp_ag_demo \ 110d7ee901aSMatthias Ringwald hfp_hf_demo \ 111d7ee901aSMatthias Ringwald hsp_ag_demo \ 112d7ee901aSMatthias Ringwald hsp_hs_demo \ 113d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1147c485f8bSMatthias Ringwald sm_pairing_central \ 115*f1b34e8dSMatthias Ringwald pbap_client \ 116bcf00d8fSMatthias Ringwald 117bcf00d8fSMatthias RingwaldEXAMPLES_USING_LE = \ 118bcf00d8fSMatthias Ringwald ancs_client_demo \ 119bcf00d8fSMatthias Ringwald gatt_battery_query \ 120bcf00d8fSMatthias Ringwald gatt_browser \ 121bcf00d8fSMatthias Ringwald le_counter \ 122bcf00d8fSMatthias Ringwald le_streamer \ 123c8f97be6SMatthias Ringwald le_streamer_client \ 124bcf00d8fSMatthias Ringwald spp_and_le_counter \ 125bcf00d8fSMatthias Ringwald gap_le_advertisements \ 126d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1277c485f8bSMatthias Ringwald sm_pairing_central \ 128bcf00d8fSMatthias Ringwald 129bcf00d8fSMatthias Ringwald# .o for .c 130bcf00d8fSMatthias RingwaldCORE_OBJ = $(CORE:.c=.o) 131bcf00d8fSMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o) 1323a18db10SMatthias RingwaldCLASSIC_OBJ = $(CLASSIC:.c=.o) 1335b9c6aadSMatthias RingwaldSM_OBJ = $(SM:.c=.o) $(MBEDTLS:.c=.o) 134bcf00d8fSMatthias RingwaldATT_OBJ = $(ATT:.c=.o) 135bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o) 136bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o) 137bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o) 138fcb08cdbSMilanka RingwaldSBC_DECODER_OBJ = $(SBC_DECODER:.c=.o) 139fcb08cdbSMilanka RingwaldSBC_ENCODER_OBJ = $(SBC_ENCODER:.c=.o) 140fbc7c9f2SMilanka RingwaldCVSD_PLC_OBJ = $(CVSD_PLC:.c=.o) 141bcf00d8fSMatthias Ringwald 142bcf00d8fSMatthias Ringwalddefault_target: all 143bcf00d8fSMatthias Ringwald 144bcf00d8fSMatthias Ringwald# compile .gatt descriptions 145bcf00d8fSMatthias Ringwaldprofile.h: profile.gatt 146b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 147bcf00d8fSMatthias Ringwaldancs_client_demo.h: ancs_client_demo.gatt 148b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 149bcf00d8fSMatthias Ringwaldspp_and_le_counter.h: spp_and_le_counter.gatt 150b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 151bcf00d8fSMatthias Ringwaldle_counter.h: le_counter.gatt 152b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 153bcf00d8fSMatthias Ringwaldle_streamer.h: le_streamer.gatt 154b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 155d7ee901aSMatthias Ringwaldsm_pairing_peripheral.h: sm_pairing_peripheral.gatt 156d7ee901aSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 157bcf00d8fSMatthias Ringwald 158bcf00d8fSMatthias Ringwald# examples 1593a18db10SMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c 160bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 161bcf00d8fSMatthias Ringwald 162*f1b34e8dSMatthias Ringwaldpbap_client: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} obex_iterator.c goep_client.c pbap_client.c pbap_client_demo.c 163*f1b34e8dSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 164*f1b34e8dSMatthias Ringwald 1653a18db10SMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_general_query.c 166bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 167bcf00d8fSMatthias Ringwald 1683a18db10SMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_bnep_query.c 169bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 170bcf00d8fSMatthias Ringwald 1713a18db10SMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter.c 172bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 173bcf00d8fSMatthias Ringwald 1748577affdSMatthias Ringwaldle_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} battery_service_server.o le_counter.c 175bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 176bcf00d8fSMatthias Ringwald 1775b9c6aadSMatthias Ringwaldsm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} sm_pairing_peripheral.c 178d7ee901aSMatthias Ringwald ${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 179d7ee901aSMatthias Ringwald 1805b9c6aadSMatthias Ringwaldsm_pairing_central: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ad_parser.o sm_pairing_central.o 18105cb0471SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 1827c485f8bSMatthias Ringwald 1835b9c6aadSMatthias Ringwaldle_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} le_streamer.c 184bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 185bcf00d8fSMatthias Ringwald 186c8f97be6SMatthias Ringwaldle_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} le_streamer_client.c 187c8f97be6SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 188c8f97be6SMatthias Ringwald 1895b9c6aadSMatthias Ringwaldspp_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 190bcf00d8fSMatthias Ringwald ${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 191bcf00d8fSMatthias Ringwald 1923a18db10SMatthias Ringwaldspp_counter_ssp: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter_ssp.c 193bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 194bcf00d8fSMatthias Ringwald 1953a18db10SMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_streamer.c 196bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 197bcf00d8fSMatthias Ringwald 1983a18db10SMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_dedicated_bonding.c 199bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 200bcf00d8fSMatthias Ringwald 2013a18db10SMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ad_parser.o gap_inquiry.c 202bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 203bcf00d8fSMatthias Ringwald 2043a18db10SMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} panu_demo.c 205bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 206bcf00d8fSMatthias Ringwald 2075b9c6aadSMatthias Ringwaldgatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} gatt_browser.c 208bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 209bcf00d8fSMatthias Ringwald 2105b9c6aadSMatthias Ringwaldgatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} gatt_battery_query.c 211bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 212bcf00d8fSMatthias Ringwald 2135b9c6aadSMatthias Ringwaldancs_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 214bcf00d8fSMatthias Ringwald ${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 215bcf00d8fSMatthias Ringwald 216bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c 217bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 218bcf00d8fSMatthias Ringwald 219bcf00d8fSMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c 220bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 221bcf00d8fSMatthias Ringwald 222dbb41bfeSMilanka Ringwaldhsp_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 223fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 224bcf00d8fSMatthias Ringwald 225dbb41bfeSMilanka Ringwaldhsp_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 226fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 227fffdd288SMatthias Ringwald 228dbb41bfeSMilanka Ringwaldhfp_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 229fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 230fffdd288SMatthias Ringwald 231dbb41bfeSMilanka Ringwaldhfp_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 232fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 233fffdd288SMatthias Ringwald 234bcf00d8fSMatthias Ringwaldclean: 235bcf00d8fSMatthias Ringwald rm -f ${EXAMPLES} 236bcf00d8fSMatthias Ringwald rm -f *.o *.out *.hex *.exe 237c8b300b9SMatthias Ringwald rm -f ancs_client_demo.h profile.h spp_and_le_counter.h le_counter.h le_streamer.h 238bcf00d8fSMatthias Ringwald rm -rf *.dSYM 239bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/*.o 240c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/ble/*.o 241c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/ble/gatt-service/*.o 242c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/example/*.o 243c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/example/ancs_client_demo.h 244c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/example/profile.h 245c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/example/spp_and_le_counter.h 246c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/example/le_counter.h 247c8b300b9SMatthias Ringwald rm -rf ${BTSTACK_ROOT}/example/le_streamer.h 248bcf00d8fSMatthias Ringwald 249