From 4fc359d9559c086ad8af29e9fecd93f0365653f6 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 12 Jun 2015 22:16:57 +0200 Subject: [PATCH] moved hsp implementation to src/ and all pts tests to test/pts --- example/embedded/Makefile.inc | 30 +------------------ platforms/libusb/Makefile | 8 +---- {example/embedded => src}/hsp_ag.c | 0 {example/embedded => src}/hsp_ag.h | 0 {example/embedded => src}/hsp_hs.c | 0 {example/embedded => src}/hsp_hs.h | 0 .../embedded => test/pts}/ble_central_test.c | 0 .../pts}/ble_peripheral_test.c | 0 {example/embedded => test/pts}/bnep_test.c | 0 {example/embedded => test/pts}/classic_test.c | 0 {example/embedded => test/pts}/hfp_test.c | 0 {example/embedded => test/pts}/hsp_ag_test.c | 0 {example/embedded => test/pts}/hsp_hs_test.c | 0 {example/embedded => test/pts}/l2cap_test.c | 0 14 files changed, 2 insertions(+), 36 deletions(-) rename {example/embedded => src}/hsp_ag.c (100%) rename {example/embedded => src}/hsp_ag.h (100%) rename {example/embedded => src}/hsp_hs.c (100%) rename {example/embedded => src}/hsp_hs.h (100%) rename {example/embedded => test/pts}/ble_central_test.c (100%) rename {example/embedded => test/pts}/ble_peripheral_test.c (100%) rename {example/embedded => test/pts}/bnep_test.c (100%) rename {example/embedded => test/pts}/classic_test.c (100%) rename {example/embedded => test/pts}/hfp_test.c (100%) rename {example/embedded => test/pts}/hsp_ag_test.c (100%) rename {example/embedded => test/pts}/hsp_hs_test.c (100%) rename {example/embedded => test/pts}/l2cap_test.c (100%) diff --git a/example/embedded/Makefile.inc b/example/embedded/Makefile.inc index 8be015ece..aa5bbf1c5 100644 --- a/example/embedded/Makefile.inc +++ b/example/embedded/Makefile.inc @@ -73,16 +73,11 @@ EXAMPLES = \ EXAMPLES_USING_LE = \ ancs_client \ - ble_central_test \ - ble_peripheral_test \ gatt_battery_query \ gatt_browser \ led_counter \ spp_and_le_counter \ -# requires termios / command line support -EXAMPLES_CLI = ble_peripheral_test ble_central_test l2cap_test ancs_client classic_test bnep_test hsp_ag_test hsp_hs_test - # .o for .c CORE_OBJ = $(CORE:.c=.o) COMMON_OBJ = $(COMMON:.c=.o) @@ -154,35 +149,12 @@ gatt_battery_query: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM ancs_client: ancs_client.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL_OBJ} ${BTSTACK_ROOT}/ble/ancs_client_lib.c ancs_client.c ${CC} $(filter-out ancs_client.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ - -# CLI Examples -ble_peripheral_test: profile.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral_test.o - ${CC} $(filter-out profile.h,$^) ${CFLAGS} ${LDFLAGS} -o $@ - -ble_central_test: ${CORE_OBJ} ${COMMON_OBJ} ${SM_REAL_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ble_central_test.c - ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ - -hsp_ag_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_ag.o hsp_ag_test.c - ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ - -hsp_hs_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_hs.o hsp_hs_test.c - ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ - -l2cap_test: ${CORE_OBJ} ${COMMON_OBJ} l2cap_test.c - ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ - -classic_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} classic_test.c - ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ - -bnep_test: ${CORE_OBJ} ${COMMON_OBJ} bnep_test.c +led_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ ble_client: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${SM_REAL} ble_client.c ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ -led_counter: ${CORE_OBJ} ${COMMON_OBJ} led_counter.c - ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ - clean: rm -f ${EXAMPLES} diff --git a/platforms/libusb/Makefile b/platforms/libusb/Makefile index 1875e8de8..3d0824ad8 100644 --- a/platforms/libusb/Makefile +++ b/platforms/libusb/Makefile @@ -6,8 +6,8 @@ CORE += main.c stdin_support.c COMMON += hci_transport_h2_libusb.c run_loop_posix.c remote_device_db_fs.c - include ${BTSTACK_ROOT}/example/embedded/Makefile.inc + # CC = gcc-fsf-4.9 CFLAGS += -g -Wall # CFLAGS += -Werror @@ -25,10 +25,4 @@ CFLAGS += $(shell pkg-config libusb-1.0 --cflags) LDFLAGS += $(shell pkg-config libusb-1.0 --libs) endif -# Command Line examples require porting to win32, so only build on other unix-ish hosts -ifneq ($(OS),Windows_NT) -EXAMPLES += ${EXAMPLES_CLI} -CFLAGS += -I${POSIX_ROOT}/src -endif - all: ${BTSTACK_ROOT}/include/btstack/version.h ${EXAMPLES} diff --git a/example/embedded/hsp_ag.c b/src/hsp_ag.c similarity index 100% rename from example/embedded/hsp_ag.c rename to src/hsp_ag.c diff --git a/example/embedded/hsp_ag.h b/src/hsp_ag.h similarity index 100% rename from example/embedded/hsp_ag.h rename to src/hsp_ag.h diff --git a/example/embedded/hsp_hs.c b/src/hsp_hs.c similarity index 100% rename from example/embedded/hsp_hs.c rename to src/hsp_hs.c diff --git a/example/embedded/hsp_hs.h b/src/hsp_hs.h similarity index 100% rename from example/embedded/hsp_hs.h rename to src/hsp_hs.h diff --git a/example/embedded/ble_central_test.c b/test/pts/ble_central_test.c similarity index 100% rename from example/embedded/ble_central_test.c rename to test/pts/ble_central_test.c diff --git a/example/embedded/ble_peripheral_test.c b/test/pts/ble_peripheral_test.c similarity index 100% rename from example/embedded/ble_peripheral_test.c rename to test/pts/ble_peripheral_test.c diff --git a/example/embedded/bnep_test.c b/test/pts/bnep_test.c similarity index 100% rename from example/embedded/bnep_test.c rename to test/pts/bnep_test.c diff --git a/example/embedded/classic_test.c b/test/pts/classic_test.c similarity index 100% rename from example/embedded/classic_test.c rename to test/pts/classic_test.c diff --git a/example/embedded/hfp_test.c b/test/pts/hfp_test.c similarity index 100% rename from example/embedded/hfp_test.c rename to test/pts/hfp_test.c diff --git a/example/embedded/hsp_ag_test.c b/test/pts/hsp_ag_test.c similarity index 100% rename from example/embedded/hsp_ag_test.c rename to test/pts/hsp_ag_test.c diff --git a/example/embedded/hsp_hs_test.c b/test/pts/hsp_hs_test.c similarity index 100% rename from example/embedded/hsp_hs_test.c rename to test/pts/hsp_hs_test.c diff --git a/example/embedded/l2cap_test.c b/test/pts/l2cap_test.c similarity index 100% rename from example/embedded/l2cap_test.c rename to test/pts/l2cap_test.c