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