1bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src 2bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble 3bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic 4bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/example 5faccbb29SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/mbedtls/library 6bcf00d8fSMatthias Ringwald 7bcf00d8fSMatthias RingwaldCFLAGS += -I. 8bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/ble 9bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/classic 10bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src 11faccbb29SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include 12e53be891SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/test/security_manager 13bcf00d8fSMatthias Ringwald 14bcf00d8fSMatthias RingwaldCORE += \ 15bcf00d8fSMatthias Ringwald btstack_memory.c \ 16bcf00d8fSMatthias Ringwald btstack_linked_list.c \ 17bcf00d8fSMatthias Ringwald btstack_memory_pool.c \ 18bcf00d8fSMatthias Ringwald btstack_run_loop.c \ 19bcf00d8fSMatthias Ringwald btstack_util.c \ 20bcf00d8fSMatthias Ringwald 21bcf00d8fSMatthias RingwaldCOMMON += \ 22bcf00d8fSMatthias Ringwald hci.c \ 23bcf00d8fSMatthias Ringwald hci_cmd.c \ 24bcf00d8fSMatthias Ringwald hci_dump.c \ 25bcf00d8fSMatthias Ringwald l2cap.c \ 26bcf00d8fSMatthias Ringwald l2cap_signaling.c \ 27bcf00d8fSMatthias Ringwald btstack_link_key_db_memory.c \ 28bcf00d8fSMatthias Ringwald sdp_util.c \ 29efda0b48SMatthias Ringwald spp_server.c \ 30bcf00d8fSMatthias Ringwald rfcomm.c \ 31bcf00d8fSMatthias Ringwald bnep.c \ 32bcf00d8fSMatthias Ringwald sdp_server.c \ 33bcf00d8fSMatthias Ringwald 34bcf00d8fSMatthias RingwaldSDP_CLIENT += \ 35bcf00d8fSMatthias Ringwald sdp_client.o \ 36efda0b48SMatthias Ringwald sdp_client_rfcomm.o \ 37bcf00d8fSMatthias Ringwald 38bcf00d8fSMatthias RingwaldATT += \ 39bcf00d8fSMatthias Ringwald att_dispatch.c \ 40bcf00d8fSMatthias Ringwald 41bcf00d8fSMatthias RingwaldGATT_SERVER += \ 42bcf00d8fSMatthias Ringwald att_db.c \ 43bcf00d8fSMatthias Ringwald att_server.c \ 44bcf00d8fSMatthias Ringwald 45bcf00d8fSMatthias RingwaldGATT_CLIENT += \ 46bcf00d8fSMatthias Ringwald ad_parser.c \ 47bcf00d8fSMatthias Ringwald gatt_client.c \ 48bcf00d8fSMatthias Ringwald 49bcf00d8fSMatthias RingwaldSM_REAL += \ 50bcf00d8fSMatthias Ringwald sm.c \ 51bcf00d8fSMatthias Ringwald le_device_db_memory.c \ 52bcf00d8fSMatthias Ringwald 53bcf00d8fSMatthias RingwaldPAN += \ 54bcf00d8fSMatthias Ringwald pan.c \ 55bcf00d8fSMatthias Ringwald 56faccbb29SMatthias RingwaldMBEDTLS = \ 57faccbb29SMatthias Ringwald bignum.c \ 58faccbb29SMatthias Ringwald ecp.c \ 59faccbb29SMatthias Ringwald ecp_curves.c \ 6068437d83SMatthias Ringwald sm_mbedtls_allocator.c \ 61d3bd9600SMatthias Ringwald memory_buffer_alloc.c \ 626643eff8SMatthias Ringwald platform.c \ 63faccbb29SMatthias Ringwald 64bcf00d8fSMatthias RingwaldEXAMPLES = \ 65bcf00d8fSMatthias Ringwald ancs_client_demo \ 66bcf00d8fSMatthias Ringwald gap_dedicated_bonding \ 67bcf00d8fSMatthias Ringwald gap_inquiry \ 68bcf00d8fSMatthias Ringwald gatt_battery_query \ 69bcf00d8fSMatthias Ringwald gatt_browser \ 70bcf00d8fSMatthias Ringwald le_counter \ 71bcf00d8fSMatthias Ringwald le_streamer \ 72bcf00d8fSMatthias Ringwald led_counter \ 73bcf00d8fSMatthias Ringwald sdp_bnep_query \ 74bcf00d8fSMatthias Ringwald sdp_general_query \ 75bcf00d8fSMatthias Ringwald sdp_rfcomm_query \ 76bcf00d8fSMatthias Ringwald spp_and_le_counter \ 77bcf00d8fSMatthias Ringwald spp_counter \ 78bcf00d8fSMatthias Ringwald spp_streamer \ 79bcf00d8fSMatthias Ringwald gap_le_advertisements \ 80fffdd288SMatthias Ringwald hfp_ag_demo \ 81d7ee901aSMatthias Ringwald hfp_hf_demo \ 82d7ee901aSMatthias Ringwald hsp_ag_demo \ 83d7ee901aSMatthias Ringwald hsp_hs_demo \ 84d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 85*7c485f8bSMatthias Ringwald sm_pairing_central \ 86bcf00d8fSMatthias Ringwald 87bcf00d8fSMatthias RingwaldEXAMPLES_USING_LE = \ 88bcf00d8fSMatthias Ringwald ancs_client_demo \ 89bcf00d8fSMatthias Ringwald gatt_battery_query \ 90bcf00d8fSMatthias Ringwald gatt_browser \ 91bcf00d8fSMatthias Ringwald le_counter \ 92bcf00d8fSMatthias Ringwald le_streamer \ 93bcf00d8fSMatthias Ringwald spp_and_le_counter \ 94bcf00d8fSMatthias Ringwald gap_le_advertisements \ 95d7ee901aSMatthias Ringwald sm_pairing_peripheral \ 96*7c485f8bSMatthias Ringwald sm_pairing_central \ 97bcf00d8fSMatthias Ringwald 98bcf00d8fSMatthias Ringwald# .o for .c 99bcf00d8fSMatthias RingwaldCORE_OBJ = $(CORE:.c=.o) 100bcf00d8fSMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o) 101faccbb29SMatthias RingwaldSM_REAL_OBJ = $(SM_REAL:.c=.o) $(MBEDTLS:.c=.o) 102bcf00d8fSMatthias RingwaldATT_OBJ = $(ATT:.c=.o) 103bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o) 104bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o) 105bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o) 106bcf00d8fSMatthias Ringwald 107bcf00d8fSMatthias Ringwalddefault_target: all 108bcf00d8fSMatthias Ringwald 109bcf00d8fSMatthias Ringwald# compile .gatt descriptions 110bcf00d8fSMatthias Ringwaldprofile.h: profile.gatt 111b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 112bcf00d8fSMatthias Ringwaldancs_client_demo.h: ancs_client_demo.gatt 113b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 114bcf00d8fSMatthias Ringwaldspp_and_le_counter.h: spp_and_le_counter.gatt 115b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 116bcf00d8fSMatthias Ringwaldle_counter.h: le_counter.gatt 117b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 118bcf00d8fSMatthias Ringwaldle_streamer.h: le_streamer.gatt 119b3fcedb9SMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 120d7ee901aSMatthias Ringwaldsm_pairing_peripheral.h: sm_pairing_peripheral.gatt 121d7ee901aSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 122bcf00d8fSMatthias Ringwald 123bcf00d8fSMatthias Ringwald# examples 124bcf00d8fSMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c 125bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 126bcf00d8fSMatthias Ringwald 127bcf00d8fSMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_general_query.c 128bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 129bcf00d8fSMatthias Ringwald 130bcf00d8fSMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_bnep_query.c 131bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 132bcf00d8fSMatthias Ringwald 133bcf00d8fSMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} spp_counter.c 134bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 135bcf00d8fSMatthias Ringwald 136bcf00d8fSMatthias Ringwaldle_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_counter.c 137bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 138bcf00d8fSMatthias Ringwald 139d7ee901aSMatthias Ringwaldsm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} sm_pairing_peripheral.c 140d7ee901aSMatthias Ringwald ${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 141d7ee901aSMatthias Ringwald 142*7c485f8bSMatthias Ringwaldsm_pairing_central: ${CORE_OBJ} ${COMMON_OBJ} ${SM_REAL_OBJ} ad_parser.o sm_pairing_central.o 143*7c485f8bSMatthias Ringwald ${CC} ${CFLAGS} ${LDFLAGS} $^ -o $@ 144*7c485f8bSMatthias Ringwald 145bcf00d8fSMatthias Ringwaldle_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_streamer.c 146bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 147bcf00d8fSMatthias Ringwald 148bcf00d8fSMatthias 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 149bcf00d8fSMatthias Ringwald ${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 150bcf00d8fSMatthias Ringwald 151bcf00d8fSMatthias Ringwaldspp_counter_ssp: ${CORE_OBJ} ${COMMON_OBJ} spp_counter_ssp.c 152bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 153bcf00d8fSMatthias Ringwald 154bcf00d8fSMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} spp_streamer.c 155bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 156bcf00d8fSMatthias Ringwald 157bcf00d8fSMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} gap_dedicated_bonding.c 158bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 159bcf00d8fSMatthias Ringwald 160bcf00d8fSMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} gap_inquiry.c 161bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 162bcf00d8fSMatthias Ringwald 163bcf00d8fSMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} panu_demo.c 164bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 165bcf00d8fSMatthias Ringwald 166bcf00d8fSMatthias Ringwaldgatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_browser.c 167bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 168bcf00d8fSMatthias Ringwald 169bcf00d8fSMatthias Ringwaldgatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_battery_query.c 170bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 171bcf00d8fSMatthias Ringwald 172bcf00d8fSMatthias 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 173bcf00d8fSMatthias Ringwald ${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 174bcf00d8fSMatthias Ringwald 175bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c 176bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 177bcf00d8fSMatthias Ringwald 178bcf00d8fSMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c 179bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 180bcf00d8fSMatthias Ringwald 181185c8cd4SMatthias Ringwaldhsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hsp_hs.o hsp_hs_demo.c 182bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 183bcf00d8fSMatthias Ringwald 184185c8cd4SMatthias Ringwaldhsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hsp_ag.o hsp_ag_demo.c 185fffdd288SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 186fffdd288SMatthias Ringwald 187185c8cd4SMatthias Ringwaldhfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c 188fffdd288SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 189fffdd288SMatthias Ringwald 190185c8cd4SMatthias Ringwaldhfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sco_demo_util.o hfp.o hfp_hf.o hfp_hf_demo.c 191fffdd288SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 192fffdd288SMatthias Ringwald 193bcf00d8fSMatthias Ringwaldclean: 194bcf00d8fSMatthias Ringwald rm -f ${EXAMPLES} 195bcf00d8fSMatthias Ringwald rm -f *.o *.out *.hex *.exe 196bcf00d8fSMatthias Ringwald rm -f ancs_client_demo.h profile.h spp_and_le_counter.h 197bcf00d8fSMatthias Ringwald rm -rf *.dSYM 198bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/ble/*.o 199bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/*.o 200bcf00d8fSMatthias Ringwald 201bcf00d8fSMatthias Ringwald 202