1fcb08cdbSMilanka RingwaldSBC_DECODER_ROOT = ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder 2fcb08cdbSMilanka RingwaldSBC_ENCODER_ROOT = ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder 3fcb08cdbSMilanka Ringwald 4bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src 5bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble 6bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic 7bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/example 8faccbb29SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/mbedtls/library 9fcb08cdbSMilanka RingwaldVPATH += ${SBC_DECODER_ROOT}/srce 10fcb08cdbSMilanka RingwaldVPATH += ${SBC_ENCODER_ROOT}/srce 11bcf00d8fSMatthias Ringwald 12bcf00d8fSMatthias RingwaldCFLAGS += -I. 13bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/ble 14bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/classic 15bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src 16faccbb29SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include 17e53be891SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/test/security_manager 18fcb08cdbSMilanka RingwaldCFLAGS += -I${SBC_DECODER_ROOT}/include -D OI_DEBUG # -D PRINT_SAMPLES -D PRINT_SCALEFACTORS 19fcb08cdbSMilanka RingwaldCFLAGS += -I${SBC_ENCODER_ROOT}/include -D SBC_NO_PCM_CPY_OPTION 20bcf00d8fSMatthias Ringwald 21bcf00d8fSMatthias RingwaldCORE += \ 22bcf00d8fSMatthias Ringwald btstack_memory.c \ 23bcf00d8fSMatthias Ringwald btstack_linked_list.c \ 24bcf00d8fSMatthias Ringwald btstack_memory_pool.c \ 25bcf00d8fSMatthias Ringwald btstack_run_loop.c \ 26bcf00d8fSMatthias Ringwald btstack_util.c \ 27bcf00d8fSMatthias Ringwald 28bcf00d8fSMatthias RingwaldCOMMON += \ 29bcf00d8fSMatthias Ringwald hci.c \ 30bcf00d8fSMatthias Ringwald hci_cmd.c \ 31bcf00d8fSMatthias Ringwald hci_dump.c \ 32bcf00d8fSMatthias Ringwald l2cap.c \ 33bcf00d8fSMatthias Ringwald l2cap_signaling.c \ 34bcf00d8fSMatthias Ringwald btstack_link_key_db_memory.c \ 35bcf00d8fSMatthias Ringwald sdp_util.c \ 36efda0b48SMatthias Ringwald spp_server.c \ 37bcf00d8fSMatthias Ringwald rfcomm.c \ 38bcf00d8fSMatthias Ringwald bnep.c \ 39bcf00d8fSMatthias Ringwald sdp_server.c \ 40bcf00d8fSMatthias Ringwald 41bcf00d8fSMatthias RingwaldSDP_CLIENT += \ 42bcf00d8fSMatthias Ringwald sdp_client.o \ 43efda0b48SMatthias Ringwald sdp_client_rfcomm.o \ 44bcf00d8fSMatthias Ringwald 45bcf00d8fSMatthias RingwaldATT += \ 46bcf00d8fSMatthias Ringwald att_dispatch.c \ 47bcf00d8fSMatthias Ringwald 48bcf00d8fSMatthias RingwaldGATT_SERVER += \ 49bcf00d8fSMatthias Ringwald att_db.c \ 50bcf00d8fSMatthias Ringwald att_server.c \ 51bcf00d8fSMatthias Ringwald 52bcf00d8fSMatthias RingwaldGATT_CLIENT += \ 53bcf00d8fSMatthias Ringwald ad_parser.c \ 54bcf00d8fSMatthias Ringwald gatt_client.c \ 55bcf00d8fSMatthias Ringwald 56bcf00d8fSMatthias RingwaldSM_REAL += \ 57bcf00d8fSMatthias Ringwald sm.c \ 58bcf00d8fSMatthias Ringwald 59bcf00d8fSMatthias RingwaldPAN += \ 60bcf00d8fSMatthias Ringwald pan.c \ 61bcf00d8fSMatthias Ringwald 62faccbb29SMatthias RingwaldMBEDTLS = \ 63faccbb29SMatthias Ringwald bignum.c \ 64faccbb29SMatthias Ringwald ecp.c \ 65faccbb29SMatthias Ringwald ecp_curves.c \ 6668437d83SMatthias Ringwald sm_mbedtls_allocator.c \ 67d3bd9600SMatthias Ringwald memory_buffer_alloc.c \ 686643eff8SMatthias Ringwald platform.c \ 69faccbb29SMatthias Ringwald 70fcb08cdbSMilanka Ringwald# 71fcb08cdbSMilanka Ringwaldinclude ${SBC_DECODER_ROOT}/Makefile.inc 72fcb08cdbSMilanka Ringwaldinclude ${SBC_ENCODER_ROOT}/Makefile.inc 73fcb08cdbSMilanka Ringwald 74fcb08cdbSMilanka RingwaldSBC_DECODER += \ 754e074f72SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \ 760c87db9eSMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \ 77fcb08cdbSMilanka Ringwald 784f0d422dSMilanka RingwaldSBC_ENCODER += \ 790c87db9eSMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \ 805b4ff0f7SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/hfp_msbc.c \ 814f0d422dSMilanka Ringwald 82*fbc7c9f2SMilanka RingwaldCVSD_PLC = \ 83*fbc7c9f2SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_cvsd_plc.c \ 84*fbc7c9f2SMilanka Ringwald 85*fbc7c9f2SMilanka Ringwald 86bcf00d8fSMatthias RingwaldEXAMPLES = \ 87bcf00d8fSMatthias Ringwald ancs_client_demo \ 88bcf00d8fSMatthias Ringwald gap_dedicated_bonding \ 89bcf00d8fSMatthias Ringwald gap_inquiry \ 90bcf00d8fSMatthias Ringwald gatt_battery_query \ 91bcf00d8fSMatthias Ringwald gatt_browser \ 92bcf00d8fSMatthias Ringwald le_counter \ 93bcf00d8fSMatthias Ringwald le_streamer \ 94bcf00d8fSMatthias Ringwald led_counter \ 95bcf00d8fSMatthias Ringwald sdp_bnep_query \ 96bcf00d8fSMatthias Ringwald sdp_general_query \ 97bcf00d8fSMatthias Ringwald sdp_rfcomm_query \ 98bcf00d8fSMatthias Ringwald spp_and_le_counter \ 99bcf00d8fSMatthias Ringwald spp_counter \ 100bcf00d8fSMatthias Ringwald spp_streamer \ 101bcf00d8fSMatthias Ringwald gap_le_advertisements \ 102fffdd288SMatthias Ringwald hfp_ag_demo \ 103d7ee901aSMatthias Ringwald hfp_hf_demo \ 104d7ee901aSMatthias Ringwald hsp_ag_demo \ 105d7ee901aSMatthias Ringwald hsp_hs_demo \ 106d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1077c485f8bSMatthias Ringwald sm_pairing_central \ 108bcf00d8fSMatthias Ringwald 109bcf00d8fSMatthias RingwaldEXAMPLES_USING_LE = \ 110bcf00d8fSMatthias Ringwald ancs_client_demo \ 111bcf00d8fSMatthias Ringwald gatt_battery_query \ 112bcf00d8fSMatthias Ringwald gatt_browser \ 113bcf00d8fSMatthias Ringwald le_counter \ 114bcf00d8fSMatthias Ringwald le_streamer \ 115bcf00d8fSMatthias Ringwald spp_and_le_counter \ 116bcf00d8fSMatthias Ringwald gap_le_advertisements \ 117d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1187c485f8bSMatthias Ringwald sm_pairing_central \ 119bcf00d8fSMatthias Ringwald 120bcf00d8fSMatthias Ringwald# .o for .c 121bcf00d8fSMatthias RingwaldCORE_OBJ = $(CORE:.c=.o) 122bcf00d8fSMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o) 123faccbb29SMatthias RingwaldSM_REAL_OBJ = $(SM_REAL:.c=.o) $(MBEDTLS:.c=.o) 124bcf00d8fSMatthias RingwaldATT_OBJ = $(ATT:.c=.o) 125bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o) 126bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o) 127bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o) 128fcb08cdbSMilanka RingwaldSBC_DECODER_OBJ = $(SBC_DECODER:.c=.o) 129fcb08cdbSMilanka RingwaldSBC_ENCODER_OBJ = $(SBC_ENCODER:.c=.o) 130*fbc7c9f2SMilanka RingwaldCVSD_PLC_OBJ = $(CVSD_PLC:.c=.o) 131bcf00d8fSMatthias Ringwald 132bcf00d8fSMatthias Ringwalddefault_target: all 133bcf00d8fSMatthias Ringwald 134bcf00d8fSMatthias Ringwald# compile .gatt descriptions 135bcf00d8fSMatthias Ringwaldprofile.h: profile.gatt 136b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 137bcf00d8fSMatthias Ringwaldancs_client_demo.h: ancs_client_demo.gatt 138b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 139bcf00d8fSMatthias Ringwaldspp_and_le_counter.h: spp_and_le_counter.gatt 140b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 141bcf00d8fSMatthias Ringwaldle_counter.h: le_counter.gatt 142b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 143bcf00d8fSMatthias Ringwaldle_streamer.h: le_streamer.gatt 144b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 145d7ee901aSMatthias Ringwaldsm_pairing_peripheral.h: sm_pairing_peripheral.gatt 146d7ee901aSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 147bcf00d8fSMatthias Ringwald 148bcf00d8fSMatthias Ringwald# examples 149bcf00d8fSMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c 150bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 151bcf00d8fSMatthias Ringwald 152bcf00d8fSMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_general_query.c 153bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 154bcf00d8fSMatthias Ringwald 155bcf00d8fSMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_bnep_query.c 156bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 157bcf00d8fSMatthias Ringwald 158bcf00d8fSMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} spp_counter.c 159bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 160bcf00d8fSMatthias Ringwald 161bcf00d8fSMatthias Ringwaldle_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_counter.c 162bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 163bcf00d8fSMatthias Ringwald 164d7ee901aSMatthias Ringwaldsm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} sm_pairing_peripheral.c 165d7ee901aSMatthias Ringwald ${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 166d7ee901aSMatthias Ringwald 1677c485f8bSMatthias Ringwaldsm_pairing_central: ${CORE_OBJ} ${COMMON_OBJ} ${SM_REAL_OBJ} ad_parser.o sm_pairing_central.o 1687c485f8bSMatthias Ringwald ${CC} ${CFLAGS} ${LDFLAGS} $^ -o $@ 1697c485f8bSMatthias Ringwald 170bcf00d8fSMatthias Ringwaldle_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_streamer.c 171bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 172bcf00d8fSMatthias Ringwald 173bcf00d8fSMatthias Ringwaldspp_and_le_counter: spp_and_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} spp_and_le_counter.c 174bcf00d8fSMatthias Ringwald ${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 175bcf00d8fSMatthias Ringwald 176bcf00d8fSMatthias Ringwaldspp_counter_ssp: ${CORE_OBJ} ${COMMON_OBJ} spp_counter_ssp.c 177bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 178bcf00d8fSMatthias Ringwald 179bcf00d8fSMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} spp_streamer.c 180bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 181bcf00d8fSMatthias Ringwald 182bcf00d8fSMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} gap_dedicated_bonding.c 183bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 184bcf00d8fSMatthias Ringwald 185bcf00d8fSMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} gap_inquiry.c 186bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 187bcf00d8fSMatthias Ringwald 188bcf00d8fSMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} panu_demo.c 189bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 190bcf00d8fSMatthias Ringwald 191bcf00d8fSMatthias Ringwaldgatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_browser.c 192bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 193bcf00d8fSMatthias Ringwald 194bcf00d8fSMatthias Ringwaldgatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_battery_query.c 195bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 196bcf00d8fSMatthias Ringwald 197bcf00d8fSMatthias Ringwaldancs_client_demo: ancs_client_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} ancs_client.c ancs_client_demo.c 198bcf00d8fSMatthias Ringwald ${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 199bcf00d8fSMatthias Ringwald 200bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c 201bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 202bcf00d8fSMatthias Ringwald 203bcf00d8fSMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c 204bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 205bcf00d8fSMatthias Ringwald 206*fbc7c9f2SMilanka Ringwaldhsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o hsp_hs.o hsp_hs_demo.c 207*fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 208bcf00d8fSMatthias Ringwald 209*fbc7c9f2SMilanka Ringwaldhsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o hsp_ag.o hsp_ag_demo.c 210*fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 211fffdd288SMatthias Ringwald 212*fbc7c9f2SMilanka Ringwaldhfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c 213*fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 214fffdd288SMatthias Ringwald 215*fbc7c9f2SMilanka Ringwaldhfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o hfp.o hfp_hf.o hfp_hf_demo.c 216*fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 217fffdd288SMatthias Ringwald 218bcf00d8fSMatthias Ringwaldclean: 219bcf00d8fSMatthias Ringwald rm -f ${EXAMPLES} 220bcf00d8fSMatthias Ringwald rm -f *.o *.out *.hex *.exe 221bcf00d8fSMatthias Ringwald rm -f ancs_client_demo.h profile.h spp_and_le_counter.h 222bcf00d8fSMatthias Ringwald rm -rf *.dSYM 223bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/ble/*.o 224bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/*.o 225bcf00d8fSMatthias Ringwald 226bcf00d8fSMatthias Ringwald 227