[PATCH 5/5] mesh: Add mesh to main bluez build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 Makefile.tools      | 24 ++++++++++++++++++++++++
 bootstrap-configure |  1 +
 configure.ac        | 18 ++++++++++++++++++
 3 files changed, 43 insertions(+)

diff --git a/Makefile.tools b/Makefile.tools
index 0fd6dec..f646bb7 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -13,6 +13,30 @@ client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
 				@GLIB_LIBS@ @DBUS_LIBS@ -lreadline
 endif
 
+if BTMESH
+bin_PROGRAMS += mesh/meshctl
+
+mesh_meshctl_SOURCES = mesh/main.c \
+					mesh/node.h mesh/node.c \
+					mesh/gatt.h mesh/gatt.c \
+					mesh/crypto.h mesh/crypto.c \
+					mesh/keys.h \
+					mesh/net.h mesh/net.c \
+					mesh/prov.h mesh/prov.c \
+					mesh/util.h mesh/util.c \
+					mesh/agent.h mesh/agent.c \
+					mesh/prov-db.h mesh/prov-db.c \
+					mesh/config-model.h mesh/config-client.c \
+					mesh/config-server.c \
+					mesh/onoff-model.h mesh/onoff-model.c \
+					client/display.h client/display.c \
+					monitor/uuid.h monitor/uuid.c
+mesh_meshctl_LDADD = lib/libbluetooth-internal.la gdbus/libgdbus-internal.la \
+					src/libshared-glib.la \
+					@GLIB_LIBS@ @DBUS_LIBS@ -ljson-c -lreadline
+endif
+
+
 if MONITOR
 bin_PROGRAMS += monitor/btmon
 
diff --git a/bootstrap-configure b/bootstrap-configure
index 47926fc..658eef2 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -23,4 +23,5 @@ fi
 		--enable-android \
 		--enable-sixaxis \
 		--enable-midi \
+		--enable-mesh \
 		--disable-datafiles $*
diff --git a/configure.ac b/configure.ac
index 89b164b..bbbc760 100644
--- a/configure.ac
+++ b/configure.ac
@@ -331,6 +331,24 @@ AC_DEFINE_UNQUOTED(CONFIGDIR, "${configdir}",
 			[Directory for the configuration files])
 AC_SUBST(CONFIGDIR, "${configdir}")
 
+AC_ARG_ENABLE(mesh, AC_HELP_STRING([--enable-mesh],
+			[enable BlueZ for Bluetooth Mesh]),
+					[enable_mesh=${enableval}])
+AM_CONDITIONAL(BTMESH, test "${enable_mesh}" = "yes")
+
+if (test "${enable_mesh}" == "yes"); then
+	PKG_CHECK_MODULES(JSONC, json-c, dummy=yes,
+				AC_MSG_ERROR(json-c is required))
+	AC_SUBST(JSON_CFLAGS)
+	AC_SUBST(JSON_LIBS)
+fi
+
+if (test "${enable_mesh}" == "yes"); then
+	AC_CHECK_HEADERS(readline/readline.h, enable_readline=yes,
+                AC_MSG_ERROR(readline header files are required))
+fi
+AM_CONDITIONAL(READLINE, test "${enable_readline}" = "yes")
+
 AC_ARG_ENABLE(android, AC_HELP_STRING([--enable-android],
 			[enable BlueZ for Android]),
 					[enable_android=${enableval}])
-- 
2.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux