xref: /btstack/example/Makefile.inc (revision 78ae886b05c3548330154c3839b12bf1a5c6c3ed)
1fcb08cdbSMilanka Ringwald
2bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
3bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
4fe5451faSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble/gatt-service
5bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/classic
6cf862b36SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/mesh
7bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/example
860da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce
960da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce
10f40f8caeSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player
1160da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player
1260da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods
1397dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/
1497dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4
1597dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv6
1697dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/netif
1797dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http
1897dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server
19c1bc0b8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/md5
20c692d776SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
21e03b79abSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/yxml
2297dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/lwip
23235be4f4SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/lwip/port
2485417dcbSMatthias Ringwald
25bcf00d8fSMatthias Ringwald
26bcf00d8fSMatthias RingwaldCFLAGS += -I.
27bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/ble
28bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/classic
29cf862b36SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/mesh
30bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src
3160da6912SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include
3260da6912SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include
33f40f8caeSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/hxcmod-player
3497dc5e69SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/lwip/core/src/include/
3597dc5e69SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server
36c1bc0b8eSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/md5
37c692d776SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
38e03b79abSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/yxml
3997dc5e69SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/lwip
40235be4f4SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/lwip/port
4140e13339SMatthias Ringwald
4240e13339SMatthias Ringwald# for CVSD/SBC PLC
4340e13339SMatthias RingwaldLDFLAGS += -lm
4440e13339SMatthias Ringwald
45bcf00d8fSMatthias RingwaldCORE += \
46bcf00d8fSMatthias Ringwald	btstack_memory.c            \
47bcf00d8fSMatthias Ringwald	btstack_linked_list.c	    \
48bcf00d8fSMatthias Ringwald	btstack_memory_pool.c       \
49bcf00d8fSMatthias Ringwald	btstack_run_loop.c		    \
50bcf00d8fSMatthias Ringwald	btstack_util.c 	            \
51bcf00d8fSMatthias Ringwald
52bcf00d8fSMatthias RingwaldCOMMON += \
531cfb383eSMatthias Ringwald	ad_parser.c                 \
54bcf00d8fSMatthias Ringwald	hci.c			            \
55bcf00d8fSMatthias Ringwald	hci_cmd.c		            \
56bcf00d8fSMatthias Ringwald	hci_dump.c		            \
57bcf00d8fSMatthias Ringwald	l2cap.c			            \
58bcf00d8fSMatthias Ringwald	l2cap_signaling.c	        \
59b88bf5bfSMatthias Ringwald	btstack_audio.c             \
602ef57735SMatthias Ringwald	btstack_tlv.c               \
61d1a1f6a4SMatthias Ringwald	btstack_crypto.c            \
622b3b87f9SMatthias Ringwald	uECC.c                      \
63fedcc363SMatthias Ringwald	sm.c                        \
643a18db10SMatthias Ringwald
651b27a074SMatthias RingwaldCLASSIC ?= \
66bcf00d8fSMatthias Ringwald	sdp_util.c	                \
676bee1f95SMatthias Ringwald	gatt_sdp.c                  \
68efda0b48SMatthias Ringwald	spp_server.c  				\
69bcf00d8fSMatthias Ringwald	rfcomm.c	                \
70bcf00d8fSMatthias Ringwald	bnep.c	                    \
71bcf00d8fSMatthias Ringwald	sdp_server.c			            \
72c4b3290dSMatthias Ringwald	device_id_server.c          \
73bcf00d8fSMatthias Ringwald
74bcf00d8fSMatthias RingwaldSDP_CLIENT += \
75bcf00d8fSMatthias Ringwald	sdp_client.o		        \
76efda0b48SMatthias Ringwald	sdp_client_rfcomm.o		    \
77bcf00d8fSMatthias Ringwald
78bcf00d8fSMatthias RingwaldATT	+= \
79bcf00d8fSMatthias Ringwald	att_dispatch.c       	    \
80bcf00d8fSMatthias Ringwald
81bcf00d8fSMatthias RingwaldGATT_SERVER += \
82bcf00d8fSMatthias Ringwald	att_db.c 				 	    \
83bcf00d8fSMatthias Ringwald	att_server.c        	    \
84bcf00d8fSMatthias Ringwald
85bcf00d8fSMatthias RingwaldGATT_CLIENT += \
86bcf00d8fSMatthias Ringwald	gatt_client.c        	    			\
87174a0c1cSMilanka Ringwald	battery_service_client.c 				\
8877aad125SMilanka Ringwald	device_information_service_client.c 	\
89*78ae886bSMilanka Ringwald	scan_parameters_service_client.c 	\
90bcf00d8fSMatthias Ringwald
91bcf00d8fSMatthias RingwaldPAN += \
92bcf00d8fSMatthias Ringwald	pan.c \
93bcf00d8fSMatthias Ringwald
94faccbb29SMatthias RingwaldMBEDTLS = 					\
95faccbb29SMatthias Ringwald	bignum.c 				\
96faccbb29SMatthias Ringwald	ecp.c 					\
97faccbb29SMatthias Ringwald	ecp_curves.c 			\
9868437d83SMatthias Ringwald	sm_mbedtls_allocator.c  \
99d3bd9600SMatthias Ringwald	memory_buffer_alloc.c   \
1006643eff8SMatthias Ringwald	platform.c 				\
101faccbb29SMatthias Ringwald
102665a00cbSMilanka Ringwald
10397dc5e69SMatthias RingwaldLWIP_CORE_SRC  = init.c mem.c memp.c netif.c udp.c ip.c pbuf.c inet_chksum.c def.c tcp.c tcp_in.c tcp_out.c timeouts.c sys_arch.c
10497dc5e69SMatthias RingwaldLWIP_IPV4_SRC  = acd.c dhcp.c etharp.c icmp.c ip4.c ip4_frag.c ip4_addr.c
10597dc5e69SMatthias RingwaldLWIP_NETIF_SRC = ethernet.c
10697dc5e69SMatthias RingwaldLWIP_HTTPD = altcp_proxyconnect.c fs.c httpd.c
10797dc5e69SMatthias RingwaldLWIP_SRC = ${LWIP_CORE_SRC} ${LWIP_IPV4_SRC} ${LWIP_NETIF_SRC} ${LWIP_HTTPD} dhserver.c
10897dc5e69SMatthias Ringwald
1090e5ac34fSMatthias Ringwald# List of files for Bluedroid SBC codec
1100e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc
1110e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc
112fcb08cdbSMilanka Ringwald
113fcb08cdbSMilanka RingwaldSBC_DECODER += \
114cd7b9db2SMatthias Ringwald	btstack_sbc_plc.c \
115c37cd8f3SMatthias Ringwald	btstack_sbc_decoder_bluedroid.c \
116fcb08cdbSMilanka Ringwald
1174f0d422dSMilanka RingwaldSBC_ENCODER += \
118c37cd8f3SMatthias Ringwald	btstack_sbc_encoder_bluedroid.c \
119cd7b9db2SMatthias Ringwald	hfp_msbc.c \
1204f0d422dSMilanka Ringwald
121fbc7c9f2SMilanka RingwaldCVSD_PLC = \
122cd7b9db2SMatthias Ringwald	btstack_cvsd_plc.c \
123fbc7c9f2SMilanka Ringwald
124f40f8caeSMatthias RingwaldAVDTP += \
125f40f8caeSMatthias Ringwald	avdtp_util.c           \
126f40f8caeSMatthias Ringwald	avdtp.c                \
127f40f8caeSMatthias Ringwald	avdtp_initiator.c      \
128f40f8caeSMatthias Ringwald	avdtp_acceptor.c       \
129f40f8caeSMatthias Ringwald	avdtp_source.c 	       \
130f40f8caeSMatthias Ringwald	avdtp_sink.c           \
131f40f8caeSMatthias Ringwald	a2dp_source.c          \
132f40f8caeSMatthias Ringwald	a2dp_sink.c            \
133f40f8caeSMatthias Ringwald	btstack_ring_buffer.c \
134f40f8caeSMatthias Ringwald
135665a00cbSMilanka RingwaldAVRCP += \
136665a00cbSMilanka Ringwald	avrcp.c							\
137665a00cbSMilanka Ringwald	avrcp_controller.c				\
138665a00cbSMilanka Ringwald	avrcp_target.c					\
139665a00cbSMilanka Ringwald	avrcp_browsing.c				\
140665a00cbSMilanka Ringwald	avrcp_browsing_controller.c		\
141665a00cbSMilanka Ringwald	avrcp_browsing_target.c			\
142665a00cbSMilanka Ringwald	avrcp_media_item_iterator.c		\
143665a00cbSMilanka Ringwald
144f40f8caeSMatthias RingwaldHXCMOD_PLAYER = \
14560da6912SMatthias Ringwald	hxcmod.c                    \
14660da6912SMatthias Ringwald	nao-deceased_by_disease.c 	\
147fbc7c9f2SMilanka Ringwald
148cf862b36SMatthias RingwaldMESH = \
149cf862b36SMatthias Ringwald	adv_bearer.c \
150cf862b36SMatthias Ringwald	beacon.c \
151cf862b36SMatthias Ringwald	gatt_bearer.c \
15239018edaSMilanka Ringwald	mesh.c \
15339018edaSMilanka Ringwald	mesh_access.c \
154cc2a5f42SMilanka Ringwald	mesh_configuration_client.c \
15539018edaSMilanka Ringwald	mesh_configuration_server.c \
156cf862b36SMatthias Ringwald	mesh_crypto.c \
15739018edaSMilanka Ringwald	mesh_foundation.c \
15885dc67fcSMilanka Ringwald	mesh_generic_default_transition_time_client.c \
15907affd82SMilanka Ringwald	mesh_generic_default_transition_time_server.c \
16039018edaSMilanka Ringwald	mesh_generic_level_client.c \
16139018edaSMilanka Ringwald	mesh_generic_level_server.c \
16239018edaSMilanka Ringwald	mesh_generic_on_off_client.c \
16339018edaSMilanka Ringwald	mesh_generic_on_off_server.c \
16439018edaSMilanka Ringwald	mesh_health_server.c \
16539018edaSMilanka Ringwald	mesh_iv_index_seq_number.c \
16639018edaSMilanka Ringwald	mesh_keys.c \
167cf862b36SMatthias Ringwald	mesh_lower_transport.c \
168cf862b36SMatthias Ringwald	mesh_network.c \
169cf862b36SMatthias Ringwald	mesh_node.c \
17039018edaSMilanka Ringwald	mesh_peer.c \
17139018edaSMilanka Ringwald	mesh_provisioning_service_server.c \
17239018edaSMilanka Ringwald	mesh_proxy.c \
17339018edaSMilanka Ringwald	mesh_proxy_service_server.c \
174cf862b36SMatthias Ringwald	mesh_upper_transport.c \
17539018edaSMilanka Ringwald	mesh_virtual_addresses.c \
176cf862b36SMatthias Ringwald	pb_adv.c \
177cf862b36SMatthias Ringwald	pb_gatt.c \
17839018edaSMilanka Ringwald	provisioning.c \
17939018edaSMilanka Ringwald	provisioning_device.c \
18039018edaSMilanka Ringwald	provisioning_provisioner.c \
181cf862b36SMatthias Ringwald
182bdc352b1SMatthias Ringwald# List of General Examples without Bluetooth
183bdc352b1SMatthias Ringwald
184bdc352b1SMatthias RingwaldEXAMPLES_GENERAL =          \
1859eddf5e8SMatthias Ringwald	audio_duplex            \
186bdc352b1SMatthias Ringwald	led_counter             \
187bdc352b1SMatthias Ringwald	mod_player	            \
188bdc352b1SMatthias Ringwald	sine_player             \
189bdc352b1SMatthias Ringwald
190bdc352b1SMatthias Ringwald# List of Examples that only use Bluetooth BR/EDR = Classic
191bdc352b1SMatthias Ringwald
192bdc352b1SMatthias RingwaldEXAMPLES_CLASSIC_ONLY =     \
1939f951df8SMilanka Ringwald	a2dp_sink_demo          \
1943fb2c90bSMilanka Ringwald	a2dp_source_demo        \
195a796c06fSMilanka Ringwald	avrcp_browsing_client   \
196486d2354SMatthias Ringwald	dut_mode_classic        \
197bcf00d8fSMatthias Ringwald	gap_dedicated_bonding   \
198bcf00d8fSMatthias Ringwald	gap_inquiry             \
199caa3fd52SMatthias Ringwald	gap_link_keys           \
2003fb2c90bSMilanka Ringwald	hfp_ag_demo             \
2013fb2c90bSMilanka Ringwald	hfp_hf_demo             \
2022d05904dSMatthias Ringwald	hid_host_demo           \
2032fa56ea6SMatthias Ringwald	hid_keyboard_demo       \
204aa29f587SMatthias Ringwald	hid_mouse_demo          \
2053fb2c90bSMilanka Ringwald	hsp_ag_demo             \
2063fb2c90bSMilanka Ringwald	hsp_hs_demo             \
2073fb2c90bSMilanka Ringwald	pbap_client_demo        \
208bcf00d8fSMatthias Ringwald	sdp_bnep_query          \
209bcf00d8fSMatthias Ringwald	sdp_general_query       \
210bcf00d8fSMatthias Ringwald	sdp_rfcomm_query        \
211bcf00d8fSMatthias Ringwald	spp_counter             \
212bcf00d8fSMatthias Ringwald	spp_streamer            \
213cee62800SMatthias Ringwald	spp_streamer_client     \
214cf862b36SMatthias Ringwald	ublox_spp_le_counter    \
215bcf00d8fSMatthias Ringwald
216bdc352b1SMatthias Ringwald# List of Examples that only use Bluetooth LE
217bdc352b1SMatthias Ringwald
218bdc352b1SMatthias RingwaldEXAMPLES_LE_ONLY=           		\
219bcf00d8fSMatthias Ringwald	ancs_client_demo        		\
220bdc352b1SMatthias Ringwald	att_delayed_response    		\
221ebdf3c68SMilanka Ringwald	gap_le_advertisements   		\
222bcf00d8fSMatthias Ringwald	gatt_battery_query      		\
223bcf00d8fSMatthias Ringwald	gatt_browser            		\
224bdc352b1SMatthias Ringwald	gatt_counter            		\
22577aad125SMilanka Ringwald	gatt_device_information_query	\
2266d466148SMatthias Ringwald	gatt_heart_rate_client  		\
227bdc352b1SMatthias Ringwald	gatt_streamer_server    		\
22877aad125SMilanka Ringwald	hog_boot_host_demo      		\
229ebdf3c68SMilanka Ringwald	hog_keyboard_demo       		\
230ebdf3c68SMilanka Ringwald	hog_mouse_demo          		\
2311add4db5SMatthias Ringwald	le_data_channel_client  		\
2321add4db5SMatthias Ringwald	le_data_channel_server  		\
23307f151d6SMatthias Ringwald	le_mitm                 		\
234c8f97be6SMatthias Ringwald	le_streamer_client      		\
2350b4518e2SMatthias Ringwald	mesh_node_demo          		\
236ebdf3c68SMilanka Ringwald	nordic_spp_le_counter   		\
237ebdf3c68SMilanka Ringwald	nordic_spp_le_streamer  		\
2387c485f8bSMatthias Ringwald	sm_pairing_central      		\
239ebdf3c68SMilanka Ringwald	sm_pairing_peripheral   		\
240733ac1e8SMilanka Ringwald	ublox_spp_le_counter    		\
241bcf00d8fSMatthias Ringwald
242bdc352b1SMatthias Ringwald# List of Examples that use Bluetooth BR/EDR/LE = Dual Mode
243bdc352b1SMatthias Ringwald
244bdc352b1SMatthias RingwaldEXAMPLES_DUAL_MODE=         \
245bdc352b1SMatthias Ringwald	gatt_counter            \
246bdc352b1SMatthias Ringwald	gatt_streamer_server    \
247bdc352b1SMatthias Ringwald	spp_and_gatt_counter    \
248bdc352b1SMatthias Ringwald	spp_and_gatt_streamer   \
249bdc352b1SMatthias Ringwald
250bdc352b1SMatthias Ringwald# List of GATT files used by either LE_ONLY or DUAL_MODE examples
251bdc352b1SMatthias Ringwald
252bdc352b1SMatthias RingwaldEXAMPLES_GATT_FILES =           		\
253bdc352b1SMatthias Ringwald	ancs_client_demo.gatt       		\
25477aad125SMilanka Ringwald	att_delayed_response.gatt   		\
255bdc352b1SMatthias Ringwald	gatt_battery_query.gatt     		\
256bdc352b1SMatthias Ringwald	gatt_browser.gatt           		\
257bdc352b1SMatthias Ringwald	gatt_counter.gatt           		\
25877aad125SMilanka Ringwald	gatt_device_information_query.gatt 	\
259bdc352b1SMatthias Ringwald	gatt_streamer_server.gatt   		\
260bdc352b1SMatthias Ringwald	hog_keyboard_demo.gatt      		\
261bdc352b1SMatthias Ringwald	hog_mouse_demo.gatt         		\
262bdc352b1SMatthias Ringwald	le_data_channel_server.gatt 		\
263bdc352b1SMatthias Ringwald	nordic_spp_le_counter.gatt  		\
264bdc352b1SMatthias Ringwald	nordic_spp_le_streamer.gatt 		\
265bdc352b1SMatthias Ringwald	sm_pairing_central.gatt     		\
266bdc352b1SMatthias Ringwald	sm_pairing_peripheral.gatt  		\
267bdc352b1SMatthias Ringwald	spp_and_gatt_counter.gatt   		\
268bdc352b1SMatthias Ringwald	spp_and_gatt_streamer.gatt  		\
269bdc352b1SMatthias Ringwald	ublox_spp_le_counter.gatt  			\
270bdc352b1SMatthias Ringwald
271bdc352b1SMatthias Ringwald# .h for .gatt
272bdc352b1SMatthias RingwaldEXAMPLES_GATT_H_FILES = $(EXAMPLES_GATT_FILES:.gatt=.h)
273bdc352b1SMatthias Ringwald
274bcf00d8fSMatthias Ringwald# .o for .c
275bcf00d8fSMatthias RingwaldCORE_OBJ    = $(CORE:.c=.o)
276bcf00d8fSMatthias RingwaldCOMMON_OBJ  = $(COMMON:.c=.o)
2773a18db10SMatthias RingwaldCLASSIC_OBJ  = $(CLASSIC:.c=.o)
278bcf00d8fSMatthias RingwaldATT_OBJ     = $(ATT:.c=.o)
279bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o)
280bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o)
281bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o)
282fcb08cdbSMilanka RingwaldSBC_DECODER_OBJ  = $(SBC_DECODER:.c=.o)
283fcb08cdbSMilanka RingwaldSBC_ENCODER_OBJ  = $(SBC_ENCODER:.c=.o)
284fbc7c9f2SMilanka RingwaldCVSD_PLC_OBJ = $(CVSD_PLC:.c=.o)
285f40f8caeSMatthias RingwaldAVDTP_OBJ  = $(AVDTP:.c=.o)
286665a00cbSMilanka RingwaldAVRCP_OBJ  = $(AVRCP:.c=.o)
287f40f8caeSMatthias RingwaldHXCMOD_PLAYER_OBJ = $(HXCMOD_PLAYER:.c=.o)
28897dc5e69SMatthias RingwaldLWIP_OBJ = $(LWIP_SRC:.c=.o)
289cf862b36SMatthias RingwaldMESH_OBJ = $(MESH:.c=.o)
290bcf00d8fSMatthias Ringwald
291bcf00d8fSMatthias Ringwalddefault_target: all
292bcf00d8fSMatthias Ringwald
293bcf00d8fSMatthias Ringwald# compile .gatt descriptions
294fbf7b2f3SMatthias Ringwald%.h: %.gatt
2954783d256SMatheus Garbelini	python3 ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
296bcf00d8fSMatthias Ringwald
297bcf00d8fSMatthias Ringwald# examples
29848b86f8aSMilanka Ringwald
29995c72533SMatthias Ringwaldant_test: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ant_test.c
30095c72533SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
30195c72533SMatthias Ringwald
3023a18db10SMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c
303bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
304bcf00d8fSMatthias Ringwald
305c4466456SMilanka Ringwaldpbap_client_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} md5.o obex_iterator.o obex_message_builder.o goep_client.o yxml.o pbap_client.o pbap_client_demo.o
306f1b34e8dSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
307f1b34e8dSMatthias Ringwald
3083a18db10SMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_general_query.c
309bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
310bcf00d8fSMatthias Ringwald
3113a18db10SMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_bnep_query.c
312bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
313bcf00d8fSMatthias Ringwald
3143a18db10SMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter.c
315bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
316bcf00d8fSMatthias Ringwald
317fedcc363SMatthias Ringwaldatt_delayed_response: att_delayed_response.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} att_delayed_response.c
318beb20288SMatthias Ringwald	${CC} $(filter-out att_delayed_response.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
3197d405bedSMatthias Ringwald
320fedcc363SMatthias Ringwaldhog_keyboard_demo: hog_keyboard_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} battery_service_server.o device_information_service_server.o hids_device.o btstack_ring_buffer.o hog_keyboard_demo.c
321a4bfc4feSMatthias Ringwald	${CC} $(filter-out hog_keyboard_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
322a4bfc4feSMatthias Ringwald
323fedcc363SMatthias Ringwaldhog_mouse_demo: hog_mouse_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} battery_service_server.o device_information_service_server.o hids_device.o hog_mouse_demo.c
324fbf7b2f3SMatthias Ringwald	${CC} $(filter-out hog_mouse_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
325fbf7b2f3SMatthias Ringwald
3261aadab7aSMatthias Ringwaldhog_boot_host_demo: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} hog_boot_host_demo.c
3271aadab7aSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
3281aadab7aSMatthias Ringwald
3293c3e5a84SMatthias Ringwaldsm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} sm_pairing_peripheral.c
330d7ee901aSMatthias Ringwald	${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
331d7ee901aSMatthias Ringwald
3323c3e5a84SMatthias Ringwaldsm_pairing_central: sm_pairing_central.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} sm_pairing_central.o
333e5779dd2SMatthias Ringwald	${CC} $(filter-out sm_pairing_central.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
3347c485f8bSMatthias Ringwald
335bdc352b1SMatthias Ringwaldgatt_counter: gatt_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${CLASSIC_OBJ} battery_service_server.o gatt_counter.c
336bdc352b1SMatthias Ringwald	${CC} $(filter-out gatt_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
3376bee1f95SMatthias Ringwald
338bdc352b1SMatthias Ringwaldgatt_streamer_server: gatt_streamer_server.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${CLASSIC_OBJ} gatt_streamer_server.c
339bdc352b1SMatthias Ringwald	${CC} $(filter-out gatt_streamer_server.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
340bcf00d8fSMatthias Ringwald
341fedcc363SMatthias Ringwaldle_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} le_streamer_client.c
342c8f97be6SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
343c8f97be6SMatthias Ringwald
34407f151d6SMatthias Ringwaldle_mitm: ${CORE_OBJ} ${COMMON_OBJ} le_mitm.c
34507f151d6SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
34607f151d6SMatthias Ringwald
347fedcc363SMatthias Ringwaldgatt_heart_rate_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} gatt_heart_rate_client.c
3486104991bSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
3496104991bSMatthias Ringwald
350bdc352b1SMatthias Ringwaldspp_and_gatt_counter: spp_and_gatt_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_gatt_counter.c
351bdc352b1SMatthias Ringwald	${CC} $(filter-out spp_and_gatt_counter.h,$^)  ${CFLAGS} ${LDFLAGS} -o $@
352bcf00d8fSMatthias Ringwald
353bdc352b1SMatthias Ringwaldspp_and_gatt_streamer: spp_and_gatt_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_gatt_streamer.c
354bdc352b1SMatthias Ringwald	${CC} $(filter-out spp_and_gatt_streamer.h,$^)  ${CFLAGS} ${LDFLAGS} -o $@
3553d581950SMatthias Ringwald
356cee62800SMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_streamer.c
357bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
358bcf00d8fSMatthias Ringwald
35996cb50ecSMatthias Ringwaldspp_flowcontrol: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_flowcontrol.c
36096cb50ecSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
36196cb50ecSMatthias Ringwald
362df6b38e6SMatthias Ringwaldspp_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_streamer_client.c
363bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
364bcf00d8fSMatthias Ringwald
3653a18db10SMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_dedicated_bonding.c
366bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
367bcf00d8fSMatthias Ringwald
3681cfb383eSMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_inquiry.c
369bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
370bcf00d8fSMatthias Ringwald
371caa3fd52SMatthias Ringwaldgap_link_keys: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_link_keys.c
372caa3fd52SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
373caa3fd52SMatthias Ringwald
3746a4fc708SMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${PAN_OBJ} panu_demo.c
375bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
376bcf00d8fSMatthias Ringwald
37797dc5e69SMatthias Ringwaldpan_lwip_http_server: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${PAN_OBJ} ${LWIP_SRC} btstack_ring_buffer.o bnep_lwip.o pan_lwip_http_server.o
37897dc5e69SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
37997dc5e69SMatthias Ringwald
380fedcc363SMatthias Ringwaldgatt_browser: gatt_browser.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${GATT_SERVER_OBJ} gatt_browser.c
381add9769eSMatthias Ringwald	${CC} $(filter-out gatt_browser.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
382bcf00d8fSMatthias Ringwald
383fedcc363SMatthias Ringwaldgatt_battery_query: gatt_battery_query.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${GATT_SERVER_OBJ} gatt_battery_query.c
384add9769eSMatthias Ringwald	${CC} $(filter-out gatt_battery_query.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
385bcf00d8fSMatthias Ringwald
38677aad125SMilanka Ringwaldgatt_device_information_query: gatt_device_information_query.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${GATT_SERVER_OBJ} gatt_device_information_query.c
38777aad125SMilanka Ringwald	${CC} $(filter-out gatt_device_information_query.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
38877aad125SMilanka Ringwald
389fedcc363SMatthias Ringwaldancs_client_demo: ancs_client_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ancs_client.c ancs_client_demo.c
390bcf00d8fSMatthias Ringwald	${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
391bcf00d8fSMatthias Ringwald
392bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c
393bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
394bcf00d8fSMatthias Ringwald
395fedcc363SMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ}  gap_le_advertisements.c
396bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
397bcf00d8fSMatthias Ringwald
398dbb41bfeSMilanka Ringwaldhsp_hs_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hsp_hs.o hsp_hs_demo.c
399486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
400bcf00d8fSMatthias Ringwald
401dbb41bfeSMilanka Ringwaldhsp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hsp_ag.o hsp_ag_demo.c
402486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
403fffdd288SMatthias Ringwald
404dbb41bfeSMilanka Ringwaldhfp_ag_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hfp.o hfp_gsm_model.o hfp_ag.o hfp_ag_demo.c
405486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
406fffdd288SMatthias Ringwald
407dbb41bfeSMilanka Ringwaldhfp_hf_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${CVSD_PLC_OBJ} wav_util.o sco_demo_util.o btstack_ring_buffer.o hfp.o hfp_hf.o hfp_hf_demo.c
408486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
409fffdd288SMatthias Ringwald
41005439aa6SMilanka Ringwaldhid_host_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_hid_parser.o hid_host.o hid_host_demo.o
4112d05904dSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
4122d05904dSMatthias Ringwald
413a796c06fSMilanka Ringwaldhid_keyboard_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_ring_buffer.o hid_device.o btstack_hid_parser.o hid_keyboard_demo.o
414486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
4152fa56ea6SMatthias Ringwald
416a796c06fSMilanka Ringwaldhid_mouse_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_ring_buffer.o hid_device.o btstack_hid_parser.o hid_mouse_demo.o
417486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
418aa29f587SMatthias Ringwald
41950259306SMilanka Ringwalda2dp_source_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_ENCODER_OBJ} ${AVDTP_OBJ} ${HXCMOD_PLAYER_OBJ} avrcp.o avrcp_controller.o avrcp_target.o a2dp_source_demo.c
420486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
42108c0d996SMatthias Ringwald
42214e3e2c2SMilanka Ringwalda2dp_sink_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_DECODER_OBJ} ${AVDTP_OBJ} avrcp.o avrcp_controller.o avrcp_target.o btstack_resample.o a2dp_sink_demo.c
423486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
424486d2354SMatthias Ringwald
4255666fff4SMilanka Ringwaldavrcp_browsing_client: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${AVRCP_OBJ} ${AVDTP_OBJ} avrcp_browsing_client.c
426f12a3722SMilanka Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
427f12a3722SMilanka Ringwald
428486d2354SMatthias Ringwalddut_mode_classic: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} dut_mode_classic.c
429486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
430f40f8caeSMatthias Ringwald
431fedcc363SMatthias Ringwaldle_data_channel_client: ${CORE_OBJ} ${COMMON_OBJ} le_data_channel_client.c
432e69f2530SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
4331add4db5SMatthias Ringwald
434fedcc363SMatthias Ringwaldle_data_channel_server: le_data_channel_server.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} le_data_channel_server.c
435483d3461SMatthias Ringwald	${CC} $(filter-out le_data_channel_server.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
4361add4db5SMatthias Ringwald
437f8903005SMatthias Ringwaldmod_player: ${CORE_OBJ} ${COMMON_OBJ} ${HXCMOD_PLAYER_OBJ} btstack_audio.o mod_player.c
438f8903005SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
439f8903005SMatthias Ringwald
44069fa7fc6SMatthias Ringwaldsine_player: ${CORE_OBJ} ${COMMON_OBJ} btstack_audio.o sine_player.c
44169fa7fc6SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
44269fa7fc6SMatthias Ringwald
4439eddf5e8SMatthias Ringwaldaudio_duplex: ${CORE_OBJ} ${COMMON_OBJ} btstack_audio.o btstack_ring_buffer.o audio_duplex.c
4449eddf5e8SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
4459eddf5e8SMatthias Ringwald
446fedcc363SMatthias Ringwaldnordic_spp_le_counter: nordic_spp_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} nordic_spp_service_server.o nordic_spp_le_counter.c
447ebdf3c68SMilanka Ringwald	${CC} $(filter-out nordic_spp_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
448ebdf3c68SMilanka Ringwald
449fedcc363SMatthias Ringwaldnordic_spp_le_streamer: nordic_spp_le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} nordic_spp_service_server.o nordic_spp_le_streamer.c
450ebdf3c68SMilanka Ringwald	${CC} $(filter-out nordic_spp_le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
451ebdf3c68SMilanka Ringwald
452fedcc363SMatthias Ringwaldublox_spp_le_counter: ublox_spp_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} device_information_service_server.o ublox_spp_service_server.o ublox_spp_le_counter.c
453733ac1e8SMilanka Ringwald	${CC} $(filter-out ublox_spp_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
454733ac1e8SMilanka Ringwald
455cf862b36SMatthias Ringwaldmesh_node_demo: mesh_node_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${MESH_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} mesh_node_demo.o
456cf862b36SMatthias Ringwald	${CC} $(filter-out mesh_node_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
457cf862b36SMatthias Ringwald
458bcf00d8fSMatthias Ringwaldclean:
459bdc352b1SMatthias Ringwald	rm -f ${EXAMPLES} ${EXAMPLES_GATT_H_FILES}
460bf8e3fa8SMatthias Ringwald	rm -f  *.o *.out *.hex *.exe *.wav *.sbc
461bf8e3fa8SMatthias Ringwald	rm -rf *.dSYM
462bcf00d8fSMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/src/*.o
463c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/src/ble/*.o
464c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/src/ble/gatt-service/*.o
465bdc352b1SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/src/classic/*.o
466c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/example/*.o
467