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 gap_inquiry_and_bond \ 62bcf00d8fSMatthias Ringwald gatt_battery_query \ 63bcf00d8fSMatthias Ringwald gatt_browser \ 64bcf00d8fSMatthias Ringwald le_counter \ 65bcf00d8fSMatthias Ringwald le_streamer \ 66bcf00d8fSMatthias Ringwald led_counter \ 67bcf00d8fSMatthias Ringwald sdp_bnep_query \ 68bcf00d8fSMatthias Ringwald sdp_general_query \ 69bcf00d8fSMatthias Ringwald sdp_rfcomm_query \ 70bcf00d8fSMatthias Ringwald spp_and_le_counter \ 71bcf00d8fSMatthias Ringwald spp_counter \ 72bcf00d8fSMatthias Ringwald spp_streamer \ 73bcf00d8fSMatthias Ringwald gap_le_advertisements \ 74ecb8c3aeSMatthias Ringwald hsp_hs_demo \ 75*fffdd288SMatthias Ringwald hsp_ag_demo \ 76*fffdd288SMatthias Ringwald hfp_hf_demo \ 77*fffdd288SMatthias Ringwald hfp_ag_demo \ 78bcf00d8fSMatthias Ringwald 79bcf00d8fSMatthias RingwaldEXAMPLES_USING_LE = \ 80bcf00d8fSMatthias Ringwald ancs_client_demo \ 81bcf00d8fSMatthias Ringwald gatt_battery_query \ 82bcf00d8fSMatthias Ringwald gatt_browser \ 83bcf00d8fSMatthias Ringwald le_counter \ 84bcf00d8fSMatthias Ringwald le_streamer \ 85bcf00d8fSMatthias Ringwald spp_and_le_counter \ 86bcf00d8fSMatthias Ringwald gap_le_advertisements \ 87bcf00d8fSMatthias Ringwald 88bcf00d8fSMatthias Ringwald# .o for .c 89bcf00d8fSMatthias RingwaldCORE_OBJ = $(CORE:.c=.o) 90bcf00d8fSMatthias RingwaldCOMMON_OBJ = $(COMMON:.c=.o) 91bcf00d8fSMatthias RingwaldSM_REAL_OBJ = $(SM_REAL:.c=.o) 92bcf00d8fSMatthias RingwaldSM_MINIMAL_OBJ = $(SM_MINIMAL:.c=.o) 93bcf00d8fSMatthias RingwaldATT_OBJ = $(ATT:.c=.o) 94bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o) 95bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o) 96bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o) 97bcf00d8fSMatthias Ringwald 98bcf00d8fSMatthias Ringwalddefault_target: all 99bcf00d8fSMatthias Ringwald 100bcf00d8fSMatthias Ringwald# compile .gatt descriptions 101bcf00d8fSMatthias Ringwaldprofile.h: profile.gatt 102bcf00d8fSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ 103bcf00d8fSMatthias Ringwaldancs_client_demo.h: ancs_client_demo.gatt 104bcf00d8fSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ 105bcf00d8fSMatthias Ringwaldspp_and_le_counter.h: spp_and_le_counter.gatt 106bcf00d8fSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ 107bcf00d8fSMatthias Ringwaldle_counter.h: le_counter.gatt 108bcf00d8fSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ 109bcf00d8fSMatthias Ringwaldle_streamer.h: le_streamer.gatt 110bcf00d8fSMatthias Ringwald python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@ 111bcf00d8fSMatthias Ringwald 112bcf00d8fSMatthias Ringwald# examples 113bcf00d8fSMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c 114bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 115bcf00d8fSMatthias Ringwald 116bcf00d8fSMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_general_query.c 117bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 118bcf00d8fSMatthias Ringwald 119bcf00d8fSMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} sdp_bnep_query.c 120bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 121bcf00d8fSMatthias Ringwald 122bcf00d8fSMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} spp_counter.c 123bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 124bcf00d8fSMatthias Ringwald 125bcf00d8fSMatthias Ringwaldle_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_counter.c 126bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 127bcf00d8fSMatthias Ringwald 128bcf00d8fSMatthias Ringwaldle_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} le_streamer.c 129bcf00d8fSMatthias Ringwald ${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 130bcf00d8fSMatthias Ringwald 131bcf00d8fSMatthias 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 132bcf00d8fSMatthias Ringwald ${CC} $(filter-out spp_and_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 133bcf00d8fSMatthias Ringwald 134bcf00d8fSMatthias Ringwaldspp_counter_ssp: ${CORE_OBJ} ${COMMON_OBJ} spp_counter_ssp.c 135bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 136bcf00d8fSMatthias Ringwald 137bcf00d8fSMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} spp_streamer.c 138bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 139bcf00d8fSMatthias Ringwald 140bcf00d8fSMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} gap_dedicated_bonding.c 141bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 142bcf00d8fSMatthias Ringwald 143bcf00d8fSMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} gap_inquiry.c 144bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 145bcf00d8fSMatthias Ringwald 146bcf00d8fSMatthias Ringwaldgap_inquiry_and_bond: ${CORE_OBJ} ${COMMON_OBJ} gap_inquiry_and_bond.c 147bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 148bcf00d8fSMatthias Ringwald 149bcf00d8fSMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} panu_demo.c 150bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 151bcf00d8fSMatthias Ringwald 152bcf00d8fSMatthias Ringwaldgatt_browser: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_browser.c 153bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 154bcf00d8fSMatthias Ringwald 155bcf00d8fSMatthias Ringwaldgatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} gatt_battery_query.c 156bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 157bcf00d8fSMatthias Ringwald 158bcf00d8fSMatthias 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 159bcf00d8fSMatthias Ringwald ${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ 160bcf00d8fSMatthias Ringwald 161bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c 162bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 163bcf00d8fSMatthias Ringwald 164bcf00d8fSMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ} ad_parser.c gap_le_advertisements.c 165bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 166bcf00d8fSMatthias Ringwald 167ecb8c3aeSMatthias Ringwaldhsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_hs.o hsp_hs_demo.c 168bcf00d8fSMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 169bcf00d8fSMatthias Ringwald 170*fffdd288SMatthias Ringwaldhsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_ag.o hsp_ag_demo.c 171*fffdd288SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 172*fffdd288SMatthias Ringwald 173*fffdd288SMatthias Ringwaldhfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c 174*fffdd288SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 175*fffdd288SMatthias Ringwald 176*fffdd288SMatthias Ringwaldhfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hfp.o hfp_hf.o hfp_hf_demo.c 177*fffdd288SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 178*fffdd288SMatthias Ringwald 179bcf00d8fSMatthias Ringwaldclean: 180bcf00d8fSMatthias Ringwald rm -f ${EXAMPLES} 181bcf00d8fSMatthias Ringwald rm -f *.o *.out *.hex *.exe 182bcf00d8fSMatthias Ringwald rm -f ancs_client_demo.h profile.h spp_and_le_counter.h 183bcf00d8fSMatthias Ringwald rm -rf *.dSYM 184bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/ble/*.o 185bcf00d8fSMatthias Ringwald rm -rf ${BTSTACK_ROOT}/src/*.o 186bcf00d8fSMatthias Ringwald 187bcf00d8fSMatthias Ringwald 188