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