xref: /btstack/example/Makefile.inc (revision 235be4f4c8186ae87e48b71d082326145296f408)
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
6bcf00d8fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/example
760da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce
860da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce
9f40f8caeSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player
1060da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player
1160da6912SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods
1297dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/
1397dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4
1497dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv6
1597dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/netif
1697dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http
1797dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server
18c1bc0b8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/md5
19c692d776SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
20e03b79abSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/yxml
2197dc5e69SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/lwip
22*235be4f4SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/lwip/port
2397dc5e69SMatthias Ringwald
24bcf00d8fSMatthias Ringwald
25bcf00d8fSMatthias RingwaldCFLAGS += -I.
26bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/ble
27bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src/classic
28bcf00d8fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/src
2960da6912SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include
3060da6912SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include
31f40f8caeSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/hxcmod-player
3297dc5e69SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/lwip/core/src/include/
3397dc5e69SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server
34c1bc0b8eSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/md5
35c692d776SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
36e03b79abSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/yxml
3797dc5e69SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/lwip
38*235be4f4SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/lwip/port
3997dc5e69SMatthias Ringwald
4040e13339SMatthias Ringwald
4140e13339SMatthias Ringwald# for CVSD/SBC PLC
4240e13339SMatthias RingwaldLDFLAGS += -lm
4340e13339SMatthias Ringwald
44bcf00d8fSMatthias RingwaldCORE += \
45bcf00d8fSMatthias Ringwald	btstack_memory.c            \
46bcf00d8fSMatthias Ringwald	btstack_linked_list.c	    \
47bcf00d8fSMatthias Ringwald	btstack_memory_pool.c       \
48bcf00d8fSMatthias Ringwald	btstack_run_loop.c		    \
49bcf00d8fSMatthias Ringwald	btstack_util.c 	            \
50bcf00d8fSMatthias Ringwald
51bcf00d8fSMatthias RingwaldCOMMON += \
521cfb383eSMatthias Ringwald	ad_parser.c                 \
53bcf00d8fSMatthias Ringwald	hci.c			            \
54bcf00d8fSMatthias Ringwald	hci_cmd.c		            \
55bcf00d8fSMatthias Ringwald	hci_dump.c		            \
56bcf00d8fSMatthias Ringwald	l2cap.c			            \
57bcf00d8fSMatthias Ringwald	l2cap_signaling.c	        \
58b88bf5bfSMatthias Ringwald	btstack_audio.c             \
592ef57735SMatthias Ringwald	btstack_tlv.c               \
60d1a1f6a4SMatthias Ringwald	btstack_crypto.c            \
612b3b87f9SMatthias Ringwald	uECC.c                      \
62fedcc363SMatthias Ringwald	sm.c                        \
633a18db10SMatthias Ringwald
643a18db10SMatthias RingwaldCLASSIC += \
65bcf00d8fSMatthias Ringwald	btstack_link_key_db_memory.c   \
66bcf00d8fSMatthias Ringwald	sdp_util.c	                \
67efda0b48SMatthias Ringwald	spp_server.c  				\
68bcf00d8fSMatthias Ringwald	rfcomm.c	                \
69bcf00d8fSMatthias Ringwald	bnep.c	                    \
70bcf00d8fSMatthias Ringwald	sdp_server.c			            \
71c4b3290dSMatthias Ringwald	device_id_server.c          \
72bcf00d8fSMatthias Ringwald
73bcf00d8fSMatthias RingwaldSDP_CLIENT += \
74bcf00d8fSMatthias Ringwald	sdp_client.o		        \
75efda0b48SMatthias Ringwald	sdp_client_rfcomm.o		    \
76bcf00d8fSMatthias Ringwald
77bcf00d8fSMatthias RingwaldATT	+= \
78bcf00d8fSMatthias Ringwald	att_dispatch.c       	    \
79bcf00d8fSMatthias Ringwald
80bcf00d8fSMatthias RingwaldGATT_SERVER += \
81bcf00d8fSMatthias Ringwald	att_db.c 				 	    \
82bcf00d8fSMatthias Ringwald	att_server.c        	    \
83bcf00d8fSMatthias Ringwald
84bcf00d8fSMatthias RingwaldGATT_CLIENT += \
85bcf00d8fSMatthias Ringwald	gatt_client.c        	    \
86bcf00d8fSMatthias Ringwald
87bcf00d8fSMatthias RingwaldPAN += \
88bcf00d8fSMatthias Ringwald	pan.c \
89bcf00d8fSMatthias Ringwald
90faccbb29SMatthias RingwaldMBEDTLS = 					\
91faccbb29SMatthias Ringwald	bignum.c 				\
92faccbb29SMatthias Ringwald	ecp.c 					\
93faccbb29SMatthias Ringwald	ecp_curves.c 			\
9468437d83SMatthias Ringwald	sm_mbedtls_allocator.c  \
95d3bd9600SMatthias Ringwald	memory_buffer_alloc.c   \
966643eff8SMatthias Ringwald	platform.c 				\
97faccbb29SMatthias Ringwald
9897dc5e69SMatthias 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
9997dc5e69SMatthias RingwaldLWIP_IPV4_SRC  = acd.c dhcp.c etharp.c icmp.c ip4.c ip4_frag.c ip4_addr.c
10097dc5e69SMatthias RingwaldLWIP_NETIF_SRC = ethernet.c
10197dc5e69SMatthias RingwaldLWIP_HTTPD = altcp_proxyconnect.c fs.c httpd.c
10297dc5e69SMatthias RingwaldLWIP_SRC = ${LWIP_CORE_SRC} ${LWIP_IPV4_SRC} ${LWIP_NETIF_SRC} ${LWIP_HTTPD} dhserver.c
10397dc5e69SMatthias Ringwald
1040e5ac34fSMatthias Ringwald# List of files for Bluedroid SBC codec
1050e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc
1060e5ac34fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc
107fcb08cdbSMilanka Ringwald
108fcb08cdbSMilanka RingwaldSBC_DECODER += \
109cd7b9db2SMatthias Ringwald	btstack_sbc_plc.c \
110c37cd8f3SMatthias Ringwald	btstack_sbc_decoder_bluedroid.c \
111fcb08cdbSMilanka Ringwald
1124f0d422dSMilanka RingwaldSBC_ENCODER += \
113c37cd8f3SMatthias Ringwald	btstack_sbc_encoder_bluedroid.c \
114cd7b9db2SMatthias Ringwald	hfp_msbc.c \
1154f0d422dSMilanka Ringwald
116fbc7c9f2SMilanka RingwaldCVSD_PLC = \
117cd7b9db2SMatthias Ringwald	btstack_cvsd_plc.c \
118fbc7c9f2SMilanka Ringwald
119f40f8caeSMatthias RingwaldAVDTP += \
120f40f8caeSMatthias Ringwald	avdtp_util.c  		\
121f40f8caeSMatthias Ringwald	avdtp.c  			\
122f40f8caeSMatthias Ringwald	avdtp_initiator.c 	\
123f40f8caeSMatthias Ringwald	avdtp_acceptor.c  	\
124f40f8caeSMatthias Ringwald	avdtp_source.c 		\
125f40f8caeSMatthias Ringwald	avdtp_sink.c  		\
126f40f8caeSMatthias Ringwald	a2dp_source.c 		\
127f40f8caeSMatthias Ringwald	a2dp_sink.c  		\
128f40f8caeSMatthias Ringwald	btstack_ring_buffer.c \
129f40f8caeSMatthias Ringwald
130f40f8caeSMatthias RingwaldHXCMOD_PLAYER = \
13160da6912SMatthias Ringwald	hxcmod.c 				    \
13260da6912SMatthias Ringwald	nao-deceased_by_disease.c 	\
133fbc7c9f2SMilanka Ringwald
134bcf00d8fSMatthias RingwaldEXAMPLES = 					\
1359eddf5e8SMatthias Ringwald	audio_duplex 			\
1369f951df8SMilanka Ringwald	a2dp_sink_demo			\
1373fb2c90bSMilanka Ringwald	a2dp_source_demo        \
138bcf00d8fSMatthias Ringwald	ancs_client_demo		\
139a796c06fSMilanka Ringwald	att_delayed_response    \
140a796c06fSMilanka Ringwald	avrcp_browsing_client   \
141486d2354SMatthias Ringwald	dut_mode_classic        \
142bcf00d8fSMatthias Ringwald	gap_dedicated_bonding	\
143bcf00d8fSMatthias Ringwald	gap_inquiry 			\
1443fb2c90bSMilanka Ringwald	gap_le_advertisements   \
145caa3fd52SMatthias Ringwald	gap_link_keys           \
146bcf00d8fSMatthias Ringwald	gatt_battery_query      \
147bcf00d8fSMatthias Ringwald	gatt_browser            \
1486104991bSMatthias Ringwald	gatt_heart_rate_client	\
1493fb2c90bSMilanka Ringwald	hfp_ag_demo             \
1503fb2c90bSMilanka Ringwald	hfp_hf_demo             \
1512d05904dSMatthias Ringwald	hid_host_demo           \
1522fa56ea6SMatthias Ringwald	hid_keyboard_demo 	    \
153aa29f587SMatthias Ringwald	hid_mouse_demo          \
154a4bfc4feSMatthias Ringwald	hog_keyboard_demo       \
155fbf7b2f3SMatthias Ringwald	hog_mouse_demo          \
1563fb2c90bSMilanka Ringwald	hsp_ag_demo             \
1573fb2c90bSMilanka Ringwald	hsp_hs_demo             \
158bcf00d8fSMatthias Ringwald	le_counter              \
159ff01079bSMatthias Ringwald	le_data_channel_client  \
160ff01079bSMatthias Ringwald	le_data_channel_server  \
161bcf00d8fSMatthias Ringwald	le_streamer				\
162c8f97be6SMatthias Ringwald	le_streamer_client      \
163bcf00d8fSMatthias Ringwald	led_counter				\
164f8903005SMatthias Ringwald	mod_player	            \
165733ac1e8SMilanka Ringwald	nordic_spp_le_counter   \
166733ac1e8SMilanka Ringwald	nordic_spp_le_streamer  \
1673fb2c90bSMilanka Ringwald	pbap_client_demo		\
168bcf00d8fSMatthias Ringwald	sdp_bnep_query 			\
169bcf00d8fSMatthias Ringwald	sdp_general_query		\
170bcf00d8fSMatthias Ringwald	sdp_rfcomm_query		\
17169fa7fc6SMatthias Ringwald	sine_player             \
1723fb2c90bSMilanka Ringwald	sm_pairing_central      \
1733fb2c90bSMilanka Ringwald	sm_pairing_peripheral   \
174bcf00d8fSMatthias Ringwald	spp_and_le_counter 		\
1753d581950SMatthias Ringwald	spp_and_le_streamer     \
176bcf00d8fSMatthias Ringwald	spp_counter 			\
177bcf00d8fSMatthias Ringwald	spp_streamer			\
178cee62800SMatthias Ringwald	spp_streamer_client     \
179733ac1e8SMilanka Ringwald	ublox_spp_le_counter    \
180bcf00d8fSMatthias Ringwald
181bcf00d8fSMatthias RingwaldEXAMPLES_USING_LE =			\
182bcf00d8fSMatthias Ringwald	ancs_client_demo		\
183ebdf3c68SMilanka Ringwald	gap_le_advertisements   \
184bcf00d8fSMatthias Ringwald	gatt_battery_query      \
185bcf00d8fSMatthias Ringwald	gatt_browser			\
186ebdf3c68SMilanka Ringwald	hog_keyboard_demo       \
187ebdf3c68SMilanka Ringwald	hog_mouse_demo          \
188bcf00d8fSMatthias Ringwald	le_counter              \
1891add4db5SMatthias Ringwald	le_data_channel_client  \
1901add4db5SMatthias Ringwald	le_data_channel_server  \
191bcf00d8fSMatthias Ringwald	le_streamer				\
192c8f97be6SMatthias Ringwald	le_streamer_client      \
193ebdf3c68SMilanka Ringwald	nordic_spp_le_counter   \
194ebdf3c68SMilanka Ringwald	nordic_spp_le_streamer  \
1957c485f8bSMatthias Ringwald	sm_pairing_central      \
196ebdf3c68SMilanka Ringwald	sm_pairing_peripheral   \
197ebdf3c68SMilanka Ringwald	spp_and_le_counter	    \
198733ac1e8SMilanka Ringwald	ublox_spp_le_counter    \
199bcf00d8fSMatthias Ringwald
200bcf00d8fSMatthias Ringwald# .o for .c
201bcf00d8fSMatthias RingwaldCORE_OBJ    = $(CORE:.c=.o)
202bcf00d8fSMatthias RingwaldCOMMON_OBJ  = $(COMMON:.c=.o)
2033a18db10SMatthias RingwaldCLASSIC_OBJ  = $(CLASSIC:.c=.o)
204bcf00d8fSMatthias RingwaldATT_OBJ     = $(ATT:.c=.o)
205bcf00d8fSMatthias RingwaldGATT_CLIENT_OBJ = $(GATT_CLIENT:.c=.o)
206bcf00d8fSMatthias RingwaldGATT_SERVER_OBJ = $(GATT_SERVER:.c=.o)
207bcf00d8fSMatthias RingwaldPAN_OBJ = $(PAN:.c=.o)
208fcb08cdbSMilanka RingwaldSBC_DECODER_OBJ  = $(SBC_DECODER:.c=.o)
209fcb08cdbSMilanka RingwaldSBC_ENCODER_OBJ  = $(SBC_ENCODER:.c=.o)
210fbc7c9f2SMilanka RingwaldCVSD_PLC_OBJ = $(CVSD_PLC:.c=.o)
211f40f8caeSMatthias RingwaldAVDTP_OBJ  = $(AVDTP:.c=.o)
212f40f8caeSMatthias RingwaldHXCMOD_PLAYER_OBJ = $(HXCMOD_PLAYER:.c=.o)
21397dc5e69SMatthias RingwaldLWIP_OBJ = $(LWIP_SRC:.c=.o)
214bcf00d8fSMatthias Ringwald
215bcf00d8fSMatthias Ringwalddefault_target: all
216bcf00d8fSMatthias Ringwald
217bcf00d8fSMatthias Ringwald# compile .gatt descriptions
218fbf7b2f3SMatthias Ringwald%.h: %.gatt
219d7ee901aSMatthias Ringwald	python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
220bcf00d8fSMatthias Ringwald
221bcf00d8fSMatthias Ringwald# examples
22295c72533SMatthias Ringwaldant_test: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ant_test.c
22395c72533SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
22495c72533SMatthias Ringwald
2253a18db10SMatthias Ringwaldsdp_rfcomm_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${PAN_OBJ} ${SDP_CLIENT} sdp_rfcomm_query.c
226bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
227bcf00d8fSMatthias Ringwald
228c4466456SMilanka 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
229f1b34e8dSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
230f1b34e8dSMatthias Ringwald
2313a18db10SMatthias Ringwaldsdp_general_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_general_query.c
232bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
233bcf00d8fSMatthias Ringwald
2343a18db10SMatthias Ringwaldsdp_bnep_query: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} sdp_bnep_query.c
235bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
236bcf00d8fSMatthias Ringwald
2373a18db10SMatthias Ringwaldspp_counter: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_counter.c
238bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
239bcf00d8fSMatthias Ringwald
240fedcc363SMatthias Ringwaldle_counter: le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} battery_service_server.o le_counter.c
241bcf00d8fSMatthias Ringwald	${CC} $(filter-out le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
242bcf00d8fSMatthias Ringwald
243fedcc363SMatthias Ringwaldatt_delayed_response: att_delayed_response.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} att_delayed_response.c
244beb20288SMatthias Ringwald	${CC} $(filter-out att_delayed_response.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2457d405bedSMatthias Ringwald
246fedcc363SMatthias 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
247a4bfc4feSMatthias Ringwald	${CC} $(filter-out hog_keyboard_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
248a4bfc4feSMatthias Ringwald
249fedcc363SMatthias 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
250fbf7b2f3SMatthias Ringwald	${CC} $(filter-out hog_mouse_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
251fbf7b2f3SMatthias Ringwald
252fedcc363SMatthias Ringwaldsm_pairing_peripheral: sm_pairing_peripheral.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} sm_pairing_peripheral.c
253d7ee901aSMatthias Ringwald	${CC} $(filter-out sm_pairing_peripheral.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
254d7ee901aSMatthias Ringwald
255fedcc363SMatthias Ringwaldsm_pairing_central: sm_pairing_central.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} sm_pairing_central.o
256e5779dd2SMatthias Ringwald	${CC} $(filter-out sm_pairing_central.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
2577c485f8bSMatthias Ringwald
258fedcc363SMatthias Ringwaldle_streamer: le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} le_streamer.c
259bcf00d8fSMatthias Ringwald	${CC} $(filter-out le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
260bcf00d8fSMatthias Ringwald
261fedcc363SMatthias Ringwaldle_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} le_streamer_client.c
262c8f97be6SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
263c8f97be6SMatthias Ringwald
264fedcc363SMatthias Ringwaldgatt_heart_rate_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} gatt_heart_rate_client.c
2656104991bSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
2666104991bSMatthias Ringwald
267fedcc363SMatthias Ringwaldspp_and_le_counter: spp_and_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_le_counter.c
268bcf00d8fSMatthias Ringwald	${CC} $(filter-out spp_and_le_counter.h,$^)  ${CFLAGS} ${LDFLAGS} -o $@
269bcf00d8fSMatthias Ringwald
270fedcc363SMatthias Ringwaldspp_and_le_streamer: spp_and_le_streamer.h ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} spp_and_le_streamer.c
2713d581950SMatthias Ringwald	${CC} $(filter-out spp_and_le_streamer.h,$^)  ${CFLAGS} ${LDFLAGS} -o $@
2723d581950SMatthias Ringwald
273cee62800SMatthias Ringwaldspp_streamer: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_streamer.c
274bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
275bcf00d8fSMatthias Ringwald
27696cb50ecSMatthias Ringwaldspp_flowcontrol: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} spp_flowcontrol.c
27796cb50ecSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
27896cb50ecSMatthias Ringwald
279cee62800SMatthias Ringwaldspp_streamer_client: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} spp_streamer_client.c
280bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
281bcf00d8fSMatthias Ringwald
2823a18db10SMatthias Ringwaldgap_dedicated_bonding: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_dedicated_bonding.c
283bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
284bcf00d8fSMatthias Ringwald
2851cfb383eSMatthias Ringwaldgap_inquiry: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_inquiry.c
286bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
287bcf00d8fSMatthias Ringwald
288caa3fd52SMatthias Ringwaldgap_link_keys: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} gap_link_keys.c
289caa3fd52SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
290caa3fd52SMatthias Ringwald
2916a4fc708SMatthias Ringwaldpanu_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${PAN_OBJ} panu_demo.c
292bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
293bcf00d8fSMatthias Ringwald
29497dc5e69SMatthias 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
29597dc5e69SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
29697dc5e69SMatthias Ringwald
297fedcc363SMatthias Ringwaldgatt_browser: gatt_browser.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${GATT_SERVER_OBJ} gatt_browser.c
298add9769eSMatthias Ringwald	${CC} $(filter-out gatt_browser.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
299bcf00d8fSMatthias Ringwald
300fedcc363SMatthias Ringwaldgatt_battery_query: gatt_battery_query.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${GATT_SERVER_OBJ} gatt_battery_query.c
301add9769eSMatthias Ringwald	${CC} $(filter-out gatt_battery_query.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
302bcf00d8fSMatthias Ringwald
303fedcc363SMatthias 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
304bcf00d8fSMatthias Ringwald	${CC} $(filter-out ancs_client_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
305bcf00d8fSMatthias Ringwald
306bcf00d8fSMatthias Ringwaldled_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c
307bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
308bcf00d8fSMatthias Ringwald
309fedcc363SMatthias Ringwaldgap_le_advertisements: ${CORE_OBJ} ${COMMON_OBJ}  gap_le_advertisements.c
310bcf00d8fSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
311bcf00d8fSMatthias Ringwald
312dbb41bfeSMilanka 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
313486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
314bcf00d8fSMatthias Ringwald
315dbb41bfeSMilanka 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
316486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
317fffdd288SMatthias Ringwald
318dbb41bfeSMilanka 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
319486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
320fffdd288SMatthias Ringwald
321dbb41bfeSMilanka 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
322486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
323fffdd288SMatthias Ringwald
3241d5191c9SMatthias Ringwaldhid_host_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstack_hid_parser.o hid_host_demo.o
3252d05904dSMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
3262d05904dSMatthias Ringwald
327a796c06fSMilanka 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
328486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
3292fa56ea6SMatthias Ringwald
330a796c06fSMilanka 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
331486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
332aa29f587SMatthias Ringwald
33350259306SMilanka 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
334486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
33508c0d996SMatthias Ringwald
33614e3e2c2SMilanka 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
337486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
338486d2354SMatthias Ringwald
339954cc391SMilanka Ringwaldavrcp_browsing_client: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} avrcp.o avrcp_controller.o avrcp_browsing_controller.o avrcp_media_item_iterator.o avrcp_browsing_client.c
340f12a3722SMilanka Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
341f12a3722SMilanka Ringwald
342486d2354SMatthias Ringwalddut_mode_classic: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} dut_mode_classic.c
343486d2354SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
344f40f8caeSMatthias Ringwald
345fedcc363SMatthias Ringwaldle_data_channel_client: ${CORE_OBJ} ${COMMON_OBJ} le_data_channel_client.c
346e69f2530SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
3471add4db5SMatthias Ringwald
348fedcc363SMatthias Ringwaldle_data_channel_server: le_data_channel_server.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} le_data_channel_server.c
349483d3461SMatthias Ringwald	${CC} $(filter-out le_data_channel_server.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
3501add4db5SMatthias Ringwald
351f8903005SMatthias Ringwaldmod_player: ${CORE_OBJ} ${COMMON_OBJ} ${HXCMOD_PLAYER_OBJ} btstack_audio.o mod_player.c
352f8903005SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
353f8903005SMatthias Ringwald
35469fa7fc6SMatthias Ringwaldsine_player: ${CORE_OBJ} ${COMMON_OBJ} btstack_audio.o sine_player.c
35569fa7fc6SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
35669fa7fc6SMatthias Ringwald
3579eddf5e8SMatthias Ringwaldaudio_duplex: ${CORE_OBJ} ${COMMON_OBJ} btstack_audio.o btstack_ring_buffer.o audio_duplex.c
3589eddf5e8SMatthias Ringwald	${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
3599eddf5e8SMatthias Ringwald
360fedcc363SMatthias 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
361ebdf3c68SMilanka Ringwald	${CC} $(filter-out nordic_spp_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
362ebdf3c68SMilanka Ringwald
363fedcc363SMatthias 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
364ebdf3c68SMilanka Ringwald	${CC} $(filter-out nordic_spp_le_streamer.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
365ebdf3c68SMilanka Ringwald
366fedcc363SMatthias 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
367733ac1e8SMilanka Ringwald	${CC} $(filter-out ublox_spp_le_counter.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
368733ac1e8SMilanka Ringwald
369bcf00d8fSMatthias Ringwaldclean:
3703fb2c90bSMilanka Ringwald	rm -f ${EXAMPLES} *_demo
371de804f9eSMilanka Ringwald	rm -f  *.o *.out *.hex *.exe *.wav *.sbc
372fbf7b2f3SMatthias Ringwald	rm -f  ancs_client_demo.h profile.h spp_and_le_counter.h le_counter.h le_streamer.h hog_keyboard_demo.h hog_mouse_demo.h
373bacdd2abSMatthias Ringwald	rm -f  gatt_battery_query.h gatt_browser.h sm_pairing_peripheral.h spp_and_le_streamer.h
374483d3461SMatthias Ringwald	rm -f  le_data_channel_server.h sm_pairing_central.h
375ba7944beSMilanka Ringwald	rm -f  nordic_spp_le_counter.h nordic_spp_le_streamer.h nordic_spp_le_counter nordic_spp_le_streamer
376733ac1e8SMilanka Ringwald	rm -f  ublox_spp_le_counter.h ublox_spp_le_counter
377ba7944beSMilanka Ringwald	rm -f  le_streamer_and_counter_client.h le_streamer_and_counter_client
378ba7944beSMilanka Ringwald	rm -f  sco_output.msbc sco_input.msbc
379bcf00d8fSMatthias Ringwald	rm -rf *.dSYM
380bcf00d8fSMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/src/*.o
381c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/src/ble/*.o
382c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/src/ble/gatt-service/*.o
383c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/example/*.o
384c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/example/ancs_client_demo.h
385c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/example/profile.h
386c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/example/spp_and_le_counter.h
387c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/example/le_counter.h
388c8b300b9SMatthias Ringwald	rm -rf ${BTSTACK_ROOT}/example/le_streamer.h
389