1fcb08cdbSMilanka Ringwald 2bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src 3bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble 4bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic 5bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/example 6faccbb29SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/mbedtls/library 70e5ac34fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce 80e5ac34fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder//srce 9bcf00d8fSMatthias Ringwald 10bcf00d8fSMatthias RingwaldCFLAGS += -I. 11bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/ble 12bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/classic 13bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src 14faccbb29SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include 150e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include 160e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include 1740e13339SMatthias Ringwald 180e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/test/security_manager 19bcf00d8fSMatthias Ringwald 2040e13339SMatthias Ringwald# for CVSD/SBC PLC 2140e13339SMatthias RingwaldLDFLAGS += -lm 2240e13339SMatthias Ringwald 23bcf00d8fSMatthias RingwaldCORE += \ 24bcf00d8fSMatthias Ringwald btstack_memory.c \ 25bcf00d8fSMatthias Ringwald btstack_linked_list.c \ 26bcf00d8fSMatthias Ringwald btstack_memory_pool.c \ 27bcf00d8fSMatthias Ringwald btstack_run_loop.c \ 28bcf00d8fSMatthias Ringwald btstack_util.c \ 29bcf00d8fSMatthias Ringwald 30bcf00d8fSMatthias RingwaldCOMMON += \ 31bcf00d8fSMatthias Ringwald hci.c \ 32bcf00d8fSMatthias Ringwald hci_cmd.c \ 33bcf00d8fSMatthias Ringwald hci_dump.c \ 34bcf00d8fSMatthias Ringwald l2cap.c \ 35bcf00d8fSMatthias Ringwald l2cap_signaling.c \ 363a18db10SMatthias Ringwald 373a18db10SMatthias RingwaldCLASSIC += \ 38bcf00d8fSMatthias Ringwald btstack_link_key_db_memory.c \ 39bcf00d8fSMatthias Ringwald sdp_util.c \ 40efda0b48SMatthias Ringwald spp_server.c \ 41bcf00d8fSMatthias Ringwald rfcomm.c \ 42bcf00d8fSMatthias Ringwald bnep.c \ 43bcf00d8fSMatthias Ringwald sdp_server.c \ 44bcf00d8fSMatthias Ringwald 45bcf00d8fSMatthias RingwaldSDP_CLIENT += \ 46bcf00d8fSMatthias Ringwald sdp_client.o \ 47efda0b48SMatthias Ringwald sdp_client_rfcomm.o \ 48bcf00d8fSMatthias Ringwald 49bcf00d8fSMatthias RingwaldATT += \ 50bcf00d8fSMatthias Ringwald att_dispatch.c \ 51bcf00d8fSMatthias Ringwald 52bcf00d8fSMatthias RingwaldGATT_SERVER += \ 53bcf00d8fSMatthias Ringwald att_db.c \ 54bcf00d8fSMatthias Ringwald att_server.c \ 55bcf00d8fSMatthias Ringwald 56bcf00d8fSMatthias RingwaldGATT_CLIENT += \ 57bcf00d8fSMatthias Ringwald ad_parser.c \ 58bcf00d8fSMatthias Ringwald gatt_client.c \ 59bcf00d8fSMatthias Ringwald 605b9c6aadSMatthias RingwaldSM += \ 61bcf00d8fSMatthias Ringwald sm.c \ 62bcf00d8fSMatthias Ringwald 63bcf00d8fSMatthias RingwaldPAN += \ 64bcf00d8fSMatthias Ringwald pan.c \ 65bcf00d8fSMatthias Ringwald 66faccbb29SMatthias RingwaldMBEDTLS = \ 67faccbb29SMatthias Ringwald bignum.c \ 68faccbb29SMatthias Ringwald ecp.c \ 69faccbb29SMatthias Ringwald ecp_curves.c \ 7068437d83SMatthias Ringwald sm_mbedtls_allocator.c \ 71d3bd9600SMatthias Ringwald memory_buffer_alloc.c \ 726643eff8SMatthias Ringwald platform.c \ 73faccbb29SMatthias Ringwald 740e5ac34fSMatthias Ringwald# List of files for Bluedroid SBC codec 750e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc 760e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc 77fcb08cdbSMilanka Ringwald 78fcb08cdbSMilanka RingwaldSBC_DECODER += \ 794e074f72SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \ 800c87db9eSMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \ 81fcb08cdbSMilanka Ringwald 824f0d422dSMilanka RingwaldSBC_ENCODER += \ 830c87db9eSMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \ 845b4ff0f7SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/hfp_msbc.c \ 854f0d422dSMilanka Ringwald 86fbc7c9f2SMilanka RingwaldCVSD_PLC = \ 87fbc7c9f2SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_cvsd_plc.c \ 88fbc7c9f2SMilanka Ringwald 89fbc7c9f2SMilanka Ringwald 90bcf00d8fSMatthias RingwaldEXAMPLES = \ 91bcf00d8fSMatthias Ringwald ancs_client_demo \ 92bcf00d8fSMatthias Ringwald gap_dedicated_bonding \ 93bcf00d8fSMatthias Ringwald gap_inquiry \ 94bcf00d8fSMatthias Ringwald gatt_battery_query \ 95bcf00d8fSMatthias Ringwald gatt_browser \ 96bcf00d8fSMatthias Ringwald le_counter \ 97bcf00d8fSMatthias Ringwald le_streamer \ 98bcf00d8fSMatthias Ringwald led_counter \ 99bcf00d8fSMatthias Ringwald sdp_bnep_query \ 100bcf00d8fSMatthias Ringwald sdp_general_query \ 101bcf00d8fSMatthias Ringwald sdp_rfcomm_query \ 102bcf00d8fSMatthias Ringwald spp_and_le_counter \ 103bcf00d8fSMatthias Ringwald spp_counter \ 104bcf00d8fSMatthias Ringwald spp_streamer \ 105bcf00d8fSMatthias Ringwald gap_le_advertisements \ 106fffdd288SMatthias Ringwald hfp_ag_demo \ 107d7ee901aSMatthias Ringwald hfp_hf_demo \ 108d7ee901aSMatthias Ringwald hsp_ag_demo \ 109d7ee901aSMatthias Ringwald hsp_hs_demo \ 110d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1117c485f8bSMatthias Ringwald sm_pairing_central \ 112bcf00d8fSMatthias Ringwald 113bcf00d8fSMatthias RingwaldEXAMPLES_USING_LE = \ 114bcf00d8fSMatthias Ringwald ancs_client_demo \ 115bcf00d8fSMatthias Ringwald gatt_battery_query \ 116bcf00d8fSMatthias Ringwald gatt_browser \ 117bcf00d8fSMatthias Ringwald le_counter \ 118bcf00d8fSMatthias Ringwald le_streamer \ 119bcf00d8fSMatthias Ringwald spp_and_le_counter \ 120bcf00d8fSMatthias Ringwald gap_le_advertisements \ 121d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1227c485f8bSMatthias Ringwald sm_pairing_central \ 123bcf00d8fSMatthias Ringwald 124bcf00d8fSMatthias Ringwald# .o for .c 125bcf00d8fSMatthias RingwaldCORE_OBJ = $(CORE:.c=.o) 126bcf00d8fSMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o) 1273a18db10SMatthias RingwaldCLASSIC_OBJ = $(CLASSIC:.c=.o) 1285b9c6aadSMatthias RingwaldSM_OBJ = $(SM:.c=.o) $(MBEDTLS:.c=.o) 129bcf00d8fSMatthias RingwaldATT_OBJ = $(ATT:.c=.o) 130bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o) 131bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o) 132bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o) 133fcb08cdbSMilanka RingwaldSBC_DECODER_OBJ = $(SBC_DECODER:.c=.o) 134fcb08cdbSMilanka RingwaldSBC_ENCODER_OBJ = $(SBC_ENCODER:.c=.o) 135fbc7c9f2SMilanka RingwaldCVSD_PLC_OBJ = $(CVSD_PLC:.c=.o) 136bcf00d8fSMatthias Ringwald 137bcf00d8fSMatthias Ringwalddefault_target: all 138bcf00d8fSMatthias Ringwald 139bcf00d8fSMatthias Ringwald# compile .gatt descriptions 140bcf00d8fSMatthias Ringwaldprofile.h: profile.gatt 141b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 142bcf00d8fSMatthias Ringwaldancs_client_demo.h: ancs_client_demo.gatt 143b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 144bcf00d8fSMatthias Ringwaldspp_and_le_counter.h: spp_and_le_counter.gatt 145b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 146bcf00d8fSMatthias Ringwaldle_counter.h: le_counter.gatt 147b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 148bcf00d8fSMatthias Ringwaldle_streamer.h: le_streamer.gatt 149b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 150d7ee901aSMatthias Ringwaldsm_pairing_peripheral.h: sm_pairing_peripheral.gatt 151d7ee901aSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 152bcf00d8fSMatthias Ringwald 153bcf00d8fSMatthias Ringwald# examples 1543a18db10SMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c 155bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 156bcf00d8fSMatthias Ringwald 1573a18db10SMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_general_query.c 158bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 159bcf00d8fSMatthias Ringwald 1603a18db10SMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_bnep_query.c 161bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 162bcf00d8fSMatthias Ringwald 1633a18db10SMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter.c 164bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 165bcf00d8fSMatthias Ringwald 1665b9c6aadSMatthias Ringwaldle_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} le_counter.c 167bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 168bcf00d8fSMatthias Ringwald 1695b9c6aadSMatthias Ringwaldsm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} sm_pairing_peripheral.c 170d7ee901aSMatthias Ringwald ${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 171d7ee901aSMatthias Ringwald 1725b9c6aadSMatthias Ringwaldsm_pairing_central: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ad_parser.o sm_pairing_central.o 17305cb0471SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 1747c485f8bSMatthias Ringwald 1755b9c6aadSMatthias Ringwaldle_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} le_streamer.c 176bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 177bcf00d8fSMatthias Ringwald 1785b9c6aadSMatthias 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 179bcf00d8fSMatthias Ringwald ${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 180bcf00d8fSMatthias Ringwald 1813a18db10SMatthias Ringwaldspp_counter_ssp: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter_ssp.c 182bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 183bcf00d8fSMatthias Ringwald 1843a18db10SMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_streamer.c 185bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 186bcf00d8fSMatthias Ringwald 1873a18db10SMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_dedicated_bonding.c 188bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 189bcf00d8fSMatthias Ringwald 1903a18db10SMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ad_parser.o gap_inquiry.c 191bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 192bcf00d8fSMatthias Ringwald 1933a18db10SMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} panu_demo.c 194bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 195bcf00d8fSMatthias Ringwald 1965b9c6aadSMatthias Ringwaldgatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} gatt_browser.c 197bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 198bcf00d8fSMatthias Ringwald 1995b9c6aadSMatthias Ringwaldgatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_OBJ} gatt_battery_query.c 200bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 201bcf00d8fSMatthias Ringwald 2025b9c6aadSMatthias 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 203bcf00d8fSMatthias Ringwald ${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 204bcf00d8fSMatthias Ringwald 205bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c 206bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 207bcf00d8fSMatthias Ringwald 208bcf00d8fSMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c 209bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 210bcf00d8fSMatthias Ringwald 211*dbb41bfeSMilanka 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 212fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 213bcf00d8fSMatthias Ringwald 214*dbb41bfeSMilanka 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 215fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 216fffdd288SMatthias Ringwald 217*dbb41bfeSMilanka 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 218fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 219fffdd288SMatthias Ringwald 220*dbb41bfeSMilanka 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 221fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 222fffdd288SMatthias Ringwald 223bcf00d8fSMatthias Ringwaldclean: 224bcf00d8fSMatthias Ringwald rm -f ${EXAMPLES} 225bcf00d8fSMatthias Ringwald rm -f *.o *.out *.hex *.exe 226bcf00d8fSMatthias Ringwald rm -f ancs_client_demo.h profile.h spp_and_le_counter.h 227bcf00d8fSMatthias Ringwald rm -rf *.dSYM 228bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/ble/*.o 229bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/*.o 230bcf00d8fSMatthias Ringwald 231bcf00d8fSMatthias Ringwald 232