From 08c0d996ca4b030decc0d756d58415bf9604a01d Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 2 Jun 2017 14:32:04 +0200 Subject: [PATCH] example/avdtp_sink: move avdtp_sink_demo to examples --- example/Makefile.inc | 4 ++++ {test/avdtp => example}/avdtp_sink_demo.c | 0 port/libusb/Makefile | 6 +++--- port/posix-h4-da14581/Makefile | 1 + port/posix-h4/Makefile | 1 + port/posix-h5-bcm/Makefile | 1 + port/posix-h5/Makefile | 1 + port/windows-h4/Makefile | 1 + port/windows-winusb/Makefile | 2 +- test/avdtp/Makefile | 3 --- 10 files changed, 13 insertions(+), 7 deletions(-) rename {test/avdtp => example}/avdtp_sink_demo.c (100%) diff --git a/example/Makefile.inc b/example/Makefile.inc index 102751b23..d4b9d02e8 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -108,6 +108,7 @@ HXCMOD_PLAYER = \ ${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods/nao-deceased_by_disease.c \ EXAMPLES = \ + avdtp_sink_demo \ avdtp_source_demo \ ancs_client_demo \ gap_dedicated_bonding \ @@ -270,6 +271,9 @@ hid_keyboard_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} btstac avdtp_source_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_ENCODER_OBJ} ${SBC_DECODER_OBJ} ${AVDTP_OBJ} ${HXCMOD_PLAYER_OBJ} avdtp_source_demo.c ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ +avdtp_sink_demo: ${CORE_OBJ} ${COMMON_OBJ} ${CLASSIC_OBJ} ${SDP_CLIENT} ${SBC_ENCODER_OBJ} ${SBC_DECODER_OBJ} ${AVDTP_OBJ} avdtp_sink_demo.c + ${CC} $^ ${CFLAGS} -I${BTSTACK_ROOT}/platform/posix ${LDFLAGS} -o $@ + clean: rm -f ${EXAMPLES} diff --git a/test/avdtp/avdtp_sink_demo.c b/example/avdtp_sink_demo.c similarity index 100% rename from test/avdtp/avdtp_sink_demo.c rename to example/avdtp_sink_demo.c diff --git a/port/libusb/Makefile b/port/libusb/Makefile index 46a60044b..050619053 100644 --- a/port/libusb/Makefile +++ b/port/libusb/Makefile @@ -3,7 +3,7 @@ BTSTACK_ROOT = ../.. CORE += main.c btstack_stdin_posix.c -COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c btstack_link_key_db_fs.c +COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c include ${BTSTACK_ROOT}/example/Makefile.inc @@ -30,8 +30,8 @@ LDFLAGS += $(shell pkg-config libusb-1.0 --libs) endif # use pkg-config for portaudio -# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO -# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs) +CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO +LDFLAGS += $(shell pkg-config portaudio-2.0 --libs) # hard coded flags for portaudio in /usr/local/lib # CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO # LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon diff --git a/port/posix-h4-da14581/Makefile b/port/posix-h4-da14581/Makefile index 9637dbb25..53e4c9ed7 100644 --- a/port/posix-h4-da14581/Makefile +++ b/port/posix-h4-da14581/Makefile @@ -10,6 +10,7 @@ CORE += \ hci_transport_h4.c \ le_device_db_fs.c \ main.c \ + wav_util.c \ stdin_support.c \ # examples diff --git a/port/posix-h4/Makefile b/port/posix-h4/Makefile index e8e6d3315..475d9cd1d 100644 --- a/port/posix-h4/Makefile +++ b/port/posix-h4/Makefile @@ -16,6 +16,7 @@ CORE += \ le_device_db_fs.c \ main.c \ btstack_stdin_posix.c \ + wav_util.c \ # bluetooth_init_cc2564_2.14.c \ # bluetooth_init_cc2564C_1.0.c \ diff --git a/port/posix-h5-bcm/Makefile b/port/posix-h5-bcm/Makefile index 9eebb5540..ebf814a51 100644 --- a/port/posix-h5-bcm/Makefile +++ b/port/posix-h5-bcm/Makefile @@ -11,6 +11,7 @@ CORE += \ hci_transport_h5.c \ le_device_db_fs.c \ main.c \ + wav_util.c \ btstack_stdin.c \ # examples diff --git a/port/posix-h5/Makefile b/port/posix-h5/Makefile index 683b1c40f..52f5917f3 100644 --- a/port/posix-h5/Makefile +++ b/port/posix-h5/Makefile @@ -15,6 +15,7 @@ CORE += \ hci_transport_h5.c \ le_device_db_fs.c \ main.c \ + wav_util.c \ btstack_stdin.c \ # TI-WL183x requires TIInit_11.8.32.c diff --git a/port/windows-h4/Makefile b/port/windows-h4/Makefile index 873c01c49..2e7aa8e73 100644 --- a/port/windows-h4/Makefile +++ b/port/windows-h4/Makefile @@ -16,6 +16,7 @@ COMMON += \ btstack_chipset_stlc2500d.c \ btstack_chipset_tc3566x.c \ btstack_chipset_bcm.c \ + wav_util.c \ # examples include ${BTSTACK_ROOT}/example/Makefile.inc diff --git a/port/windows-winusb/Makefile b/port/windows-winusb/Makefile index 17580e462..6c1d4aa8e 100644 --- a/port/windows-winusb/Makefile +++ b/port/windows-winusb/Makefile @@ -3,7 +3,7 @@ BTSTACK_ROOT = ../.. CORE += main.c btstack_stdin_windows.c -COMMON += hci_transport_h2_winusb.c btstack_run_loop_windows.c le_device_db_fs.c btstack_link_key_db_fs.c +COMMON += hci_transport_h2_winusb.c btstack_run_loop_windows.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c include ${BTSTACK_ROOT}/example/Makefile.inc diff --git a/test/avdtp/Makefile b/test/avdtp/Makefile index 7c8ab5bcc..0eee29eeb 100644 --- a/test/avdtp/Makefile +++ b/test/avdtp/Makefile @@ -99,9 +99,6 @@ HXCMOD_PLAYER_OBJ = $(HXCMOD_PLAYER:.c=.o) all: ${AVDTP_TESTS} -avdtp_sink_demo: ${CORE_OBJ} ${COMMON_OBJ} ${SBC_DECODER_OBJ} ${SBC_ENCODER_OBJ} ${AVDTP_OBJ} avdtp_sink_demo.o - ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ - portaudio_test: btstack_util.o hci_dump.o wav_util.o btstack_ring_buffer.o portaudio_test.c ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@