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 7*0e5ac34fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce 8*0e5ac34fSMatthias 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 15*0e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include 16*0e5ac34fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include 1740e13339SMatthias Ringwald 18*0e5ac34fSMatthias 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 \ 36bcf00d8fSMatthias Ringwald btstack_link_key_db_memory.c \ 37bcf00d8fSMatthias Ringwald sdp_util.c \ 38efda0b48SMatthias Ringwald spp_server.c \ 39bcf00d8fSMatthias Ringwald rfcomm.c \ 40bcf00d8fSMatthias Ringwald bnep.c \ 41bcf00d8fSMatthias Ringwald sdp_server.c \ 42bcf00d8fSMatthias Ringwald 43bcf00d8fSMatthias RingwaldSDP_CLIENT += \ 44bcf00d8fSMatthias Ringwald sdp_client.o \ 45efda0b48SMatthias Ringwald sdp_client_rfcomm.o \ 46bcf00d8fSMatthias Ringwald 47bcf00d8fSMatthias RingwaldATT += \ 48bcf00d8fSMatthias Ringwald att_dispatch.c \ 49bcf00d8fSMatthias Ringwald 50bcf00d8fSMatthias RingwaldGATT_SERVER += \ 51bcf00d8fSMatthias Ringwald att_db.c \ 52bcf00d8fSMatthias Ringwald att_server.c \ 53bcf00d8fSMatthias Ringwald 54bcf00d8fSMatthias RingwaldGATT_CLIENT += \ 55bcf00d8fSMatthias Ringwald ad_parser.c \ 56bcf00d8fSMatthias Ringwald gatt_client.c \ 57bcf00d8fSMatthias Ringwald 58bcf00d8fSMatthias RingwaldSM_REAL += \ 59bcf00d8fSMatthias Ringwald sm.c \ 60bcf00d8fSMatthias Ringwald 61bcf00d8fSMatthias RingwaldPAN += \ 62bcf00d8fSMatthias Ringwald pan.c \ 63bcf00d8fSMatthias Ringwald 64faccbb29SMatthias RingwaldMBEDTLS = \ 65faccbb29SMatthias Ringwald bignum.c \ 66faccbb29SMatthias Ringwald ecp.c \ 67faccbb29SMatthias Ringwald ecp_curves.c \ 6868437d83SMatthias Ringwald sm_mbedtls_allocator.c \ 69d3bd9600SMatthias Ringwald memory_buffer_alloc.c \ 706643eff8SMatthias Ringwald platform.c \ 71faccbb29SMatthias Ringwald 72*0e5ac34fSMatthias Ringwald# List of files for Bluedroid SBC codec 73*0e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc 74*0e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc 75fcb08cdbSMilanka Ringwald 76fcb08cdbSMilanka RingwaldSBC_DECODER += \ 774e074f72SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \ 780c87db9eSMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \ 79fcb08cdbSMilanka Ringwald 804f0d422dSMilanka RingwaldSBC_ENCODER += \ 810c87db9eSMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \ 825b4ff0f7SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/hfp_msbc.c \ 834f0d422dSMilanka Ringwald 84fbc7c9f2SMilanka RingwaldCVSD_PLC = \ 85fbc7c9f2SMilanka Ringwald ${BTSTACK_ROOT}/src/classic/btstack_cvsd_plc.c \ 86fbc7c9f2SMilanka Ringwald 87fbc7c9f2SMilanka Ringwald 88bcf00d8fSMatthias RingwaldEXAMPLES = \ 89bcf00d8fSMatthias Ringwald ancs_client_demo \ 90bcf00d8fSMatthias Ringwald gap_dedicated_bonding \ 91bcf00d8fSMatthias Ringwald gap_inquiry \ 92bcf00d8fSMatthias Ringwald gatt_battery_query \ 93bcf00d8fSMatthias Ringwald gatt_browser \ 94bcf00d8fSMatthias Ringwald le_counter \ 95bcf00d8fSMatthias Ringwald le_streamer \ 96bcf00d8fSMatthias Ringwald led_counter \ 97bcf00d8fSMatthias Ringwald sdp_bnep_query \ 98bcf00d8fSMatthias Ringwald sdp_general_query \ 99bcf00d8fSMatthias Ringwald sdp_rfcomm_query \ 100bcf00d8fSMatthias Ringwald spp_and_le_counter \ 101bcf00d8fSMatthias Ringwald spp_counter \ 102bcf00d8fSMatthias Ringwald spp_streamer \ 103bcf00d8fSMatthias Ringwald gap_le_advertisements \ 104fffdd288SMatthias Ringwald hfp_ag_demo \ 105d7ee901aSMatthias Ringwald hfp_hf_demo \ 106d7ee901aSMatthias Ringwald hsp_ag_demo \ 107d7ee901aSMatthias Ringwald hsp_hs_demo \ 108d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1097c485f8bSMatthias Ringwald sm_pairing_central \ 110bcf00d8fSMatthias Ringwald 111bcf00d8fSMatthias RingwaldEXAMPLES_USING_LE = \ 112bcf00d8fSMatthias Ringwald ancs_client_demo \ 113bcf00d8fSMatthias Ringwald gatt_battery_query \ 114bcf00d8fSMatthias Ringwald gatt_browser \ 115bcf00d8fSMatthias Ringwald le_counter \ 116bcf00d8fSMatthias Ringwald le_streamer \ 117bcf00d8fSMatthias Ringwald spp_and_le_counter \ 118bcf00d8fSMatthias Ringwald gap_le_advertisements \ 119d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 1207c485f8bSMatthias Ringwald sm_pairing_central \ 121bcf00d8fSMatthias Ringwald 122bcf00d8fSMatthias Ringwald# .o for .c 123bcf00d8fSMatthias RingwaldCORE_OBJ = $(CORE:.c=.o) 124bcf00d8fSMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o) 125faccbb29SMatthias RingwaldSM_REAL_OBJ = $(SM_REAL:.c=.o) $(MBEDTLS:.c=.o) 126bcf00d8fSMatthias RingwaldATT_OBJ = $(ATT:.c=.o) 127bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o) 128bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o) 129bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o) 130fcb08cdbSMilanka RingwaldSBC_DECODER_OBJ = $(SBC_DECODER:.c=.o) 131fcb08cdbSMilanka RingwaldSBC_ENCODER_OBJ = $(SBC_ENCODER:.c=.o) 132fbc7c9f2SMilanka RingwaldCVSD_PLC_OBJ = $(CVSD_PLC:.c=.o) 133bcf00d8fSMatthias Ringwald 134bcf00d8fSMatthias Ringwalddefault_target: all 135bcf00d8fSMatthias Ringwald 136bcf00d8fSMatthias Ringwald# compile .gatt descriptions 137bcf00d8fSMatthias Ringwaldprofile.h: profile.gatt 138b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 139bcf00d8fSMatthias Ringwaldancs_client_demo.h: ancs_client_demo.gatt 140b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 141bcf00d8fSMatthias Ringwaldspp_and_le_counter.h: spp_and_le_counter.gatt 142b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 143bcf00d8fSMatthias Ringwaldle_counter.h: le_counter.gatt 144b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 145bcf00d8fSMatthias Ringwaldle_streamer.h: le_streamer.gatt 146b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 147d7ee901aSMatthias Ringwaldsm_pairing_peripheral.h: sm_pairing_peripheral.gatt 148d7ee901aSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 149bcf00d8fSMatthias Ringwald 150bcf00d8fSMatthias Ringwald# examples 151bcf00d8fSMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c 152bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 153bcf00d8fSMatthias Ringwald 154bcf00d8fSMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_general_query.c 155bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 156bcf00d8fSMatthias Ringwald 157bcf00d8fSMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_bnep_query.c 158bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 159bcf00d8fSMatthias Ringwald 160bcf00d8fSMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} spp_counter.c 161bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 162bcf00d8fSMatthias Ringwald 163bcf00d8fSMatthias Ringwaldle_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_counter.c 164bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 165bcf00d8fSMatthias Ringwald 166d7ee901aSMatthias Ringwaldsm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} sm_pairing_peripheral.c 167d7ee901aSMatthias Ringwald ${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 168d7ee901aSMatthias Ringwald 1697c485f8bSMatthias Ringwaldsm_pairing_central: ${CORE_OBJ} ${COMMON_OBJ} ${SM_REAL_OBJ} ad_parser.o sm_pairing_central.o 17005cb0471SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 1717c485f8bSMatthias Ringwald 172bcf00d8fSMatthias Ringwaldle_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_streamer.c 173bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 174bcf00d8fSMatthias Ringwald 175bcf00d8fSMatthias 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 176bcf00d8fSMatthias Ringwald ${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 177bcf00d8fSMatthias Ringwald 178bcf00d8fSMatthias Ringwaldspp_counter_ssp: ${CORE_OBJ} ${COMMON_OBJ} spp_counter_ssp.c 179bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 180bcf00d8fSMatthias Ringwald 181bcf00d8fSMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} spp_streamer.c 182bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 183bcf00d8fSMatthias Ringwald 184bcf00d8fSMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} gap_dedicated_bonding.c 185bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 186bcf00d8fSMatthias Ringwald 187b12ad867SMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.o gap_inquiry.c 188bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 189bcf00d8fSMatthias Ringwald 190bcf00d8fSMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} panu_demo.c 191bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 192bcf00d8fSMatthias Ringwald 193bcf00d8fSMatthias Ringwaldgatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_browser.c 194bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 195bcf00d8fSMatthias Ringwald 196bcf00d8fSMatthias Ringwaldgatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_battery_query.c 197bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 198bcf00d8fSMatthias Ringwald 199bcf00d8fSMatthias 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 200bcf00d8fSMatthias Ringwald ${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 201bcf00d8fSMatthias Ringwald 202bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c 203bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 204bcf00d8fSMatthias Ringwald 205bcf00d8fSMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c 206bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 207bcf00d8fSMatthias Ringwald 208fbc7c9f2SMilanka 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 209fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 210bcf00d8fSMatthias Ringwald 211fbc7c9f2SMilanka 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 212fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 213fffdd288SMatthias Ringwald 214fbc7c9f2SMilanka 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 215fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 216fffdd288SMatthias Ringwald 217fbc7c9f2SMilanka 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 218fbc7c9f2SMilanka Ringwald ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ 219fffdd288SMatthias Ringwald 220bcf00d8fSMatthias Ringwaldclean: 221bcf00d8fSMatthias Ringwald rm -f ${EXAMPLES} 222bcf00d8fSMatthias Ringwald rm -f *.o *.out *.hex *.exe 223bcf00d8fSMatthias Ringwald rm -f ancs_client_demo.h profile.h spp_and_le_counter.h 224bcf00d8fSMatthias Ringwald rm -rf *.dSYM 225bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/ble/*.o 226bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/*.o 227bcf00d8fSMatthias Ringwald 228bcf00d8fSMatthias Ringwald 229