diff --git a/Makefile.am b/Makefile.am index 79321a621..0c79c4b59 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = platforms/posix/src example +SUBDIRS = platforms/posix/src example/daemon package: ./package.sh \ No newline at end of file diff --git a/configure.ac b/configure.ac index c53db6715..5af6b88a4 100644 --- a/configure.ac +++ b/configure.ac @@ -164,4 +164,4 @@ AC_SUBST(BTSTACK_LIB_LDFLAGS) AC_SUBST(BTSTACK_LIB_EXTENSION) AC_SUBST(LIBUSB_CFLAGS) AC_SUBST(LIBUSB_LDFLAGS) -AC_OUTPUT(Makefile platforms/posix/src/Makefile example/Makefile) +AC_OUTPUT(Makefile platforms/posix/src/Makefile example/daemon/Makefile) diff --git a/example/compat-svn.c b/example/compat-svn.c deleted file mode 100644 index 7a27eabb4..000000000 --- a/example/compat-svn.c +++ /dev/null @@ -1,14 +0,0 @@ -/** - */ - -#include -#include - - -static char new_bd_addr_to_str_buffer[6*3]; // 12:45:78:01:34:67\0 -static char * new_bd_addr_to_str(bd_addr_t addr){ - sprintf(new_bd_addr_to_str_buffer, "%02x:%02x:%02x:%02x:%02x:%02x", addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); - return (char *) new_bd_addr_to_str_buffer; -} - -#define bd_addr_to_str(x) new_bd_addr_to_str(x) diff --git a/example/Makefile.in b/example/daemon/Makefile.in similarity index 84% rename from example/Makefile.in rename to example/daemon/Makefile.in index 4aaf8c7cc..feaeb44a2 100644 --- a/example/Makefile.in +++ b/example/daemon/Makefile.in @@ -1,6 +1,7 @@ +BTSTACK_ROOT=../.. CC = @CC@ -LDFLAGS = @LDFLAGS@ -lBTstack -L../src -CFLAGS = @CFLAGS@ -I.. -I../include +LDFLAGS = @LDFLAGS@ -lBTstack -L../../src +CFLAGS = @CFLAGS@ -I$(BTSTACK_ROOT) -I$(BTSTACK_ROOT)/include prefix = @prefix@ all: test rfcomm-cat rfcomm-echo rfcomm-test inquiry l2cap-server l2cap-throughput diff --git a/example/inquiry.c b/example/daemon/inquiry.c similarity index 99% rename from example/inquiry.c rename to example/daemon/inquiry.c index d31ac1d22..70f4a3261 100644 --- a/example/inquiry.c +++ b/example/daemon/inquiry.c @@ -42,9 +42,6 @@ #include -// until next BTstack Cydia update -#include "compat-svn.c" - #define MAX_DEVICES 10 struct device { bd_addr_t address; diff --git a/example/l2cap-server.c b/example/daemon/l2cap-server.c similarity index 99% rename from example/l2cap-server.c rename to example/daemon/l2cap-server.c index 5114f4a96..5ac078ab9 100644 --- a/example/l2cap-server.c +++ b/example/daemon/l2cap-server.c @@ -44,9 +44,6 @@ #include #include -// until next BTstack Cydia update -#include "compat-svn.c" - int l2cap_reg_fail = 0; hci_con_handle_t con_handle; diff --git a/example/l2cap-throughput.c b/example/daemon/l2cap-throughput.c similarity index 99% rename from example/l2cap-throughput.c rename to example/daemon/l2cap-throughput.c index 8b0a1b346..e241b3f0c 100644 --- a/example/l2cap-throughput.c +++ b/example/daemon/l2cap-throughput.c @@ -43,9 +43,6 @@ #include #include -// until next BTstack Cydia update -#include "compat-svn.c" - #define PSM_TEST 0xdead #define PACKET_SIZE 1000 diff --git a/example/rfcomm-cat.c b/example/daemon/rfcomm-cat.c similarity index 98% rename from example/rfcomm-cat.c rename to example/daemon/rfcomm-cat.c index 6cf463a39..bf250417c 100644 --- a/example/rfcomm-cat.c +++ b/example/daemon/rfcomm-cat.c @@ -50,9 +50,6 @@ #include #include -// until next BTstack Cydia update -#include "compat-svn.c" - // input from command line arguments bd_addr_t addr = { }; uint16_t con_handle; diff --git a/example/rfcomm-echo.c b/example/daemon/rfcomm-echo.c similarity index 98% rename from example/rfcomm-echo.c rename to example/daemon/rfcomm-echo.c index 9800ab77a..d8f4096bb 100644 --- a/example/rfcomm-echo.c +++ b/example/daemon/rfcomm-echo.c @@ -46,9 +46,6 @@ #include #include -// until next BTstack Cydia update -#include "compat-svn.c" - // input from command line arguments bd_addr_t addr = { }; uint16_t con_handle; diff --git a/example/rfcomm-test.c b/example/daemon/rfcomm-test.c similarity index 99% rename from example/rfcomm-test.c rename to example/daemon/rfcomm-test.c index 83df1063c..7f083a9e9 100644 --- a/example/rfcomm-test.c +++ b/example/daemon/rfcomm-test.c @@ -46,9 +46,6 @@ #include #include -// until next BTstack Cydia update -#include "compat-svn.c" - #define NUM_ROWS 25 #define NUM_COLS 80 diff --git a/example/test.c b/example/daemon/test.c similarity index 100% rename from example/test.c rename to example/daemon/test.c