From 9de5c526eb7e925d52b43e7a43acfd9a76bfa39c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 11 Dec 2012 01:33:53 +0100 Subject: [PATCH] build: Add skeleton for command line client --- .gitignore | 1 + Makefile.tools | 5 ++++- client/main.c | 31 +++++++++++++++++++++++++++++++ configure.ac | 5 +++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 client/main.c diff --git a/.gitignore b/.gitignore index 33f8ea382..a182a451e 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,7 @@ tools/btsnoop monitor/btmon emulator/btvirt emulator/b1ee +client/bluetoothctl doc/*.bak doc/*.stamp diff --git a/Makefile.tools b/Makefile.tools index 84213aac8..9c23b99e3 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -71,8 +71,11 @@ emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \ emulator_b1ee_SOURCES = emulator/b1ee.c monitor/mainloop.h monitor/mainloop.c if READLINE -bin_PROGRAMS += attrib/gatttool +noinst_PROGRAMS += client/bluetoothctl +client_bluetoothctl_SOURCES = client/main.c +client_bluetoothctl_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lreadline +bin_PROGRAMS += attrib/gatttool attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \ attrib/gattrib.c btio/btio.c \ attrib/gatttool.h attrib/interactive.c \ diff --git a/client/main.c b/client/main.c new file mode 100644 index 000000000..b38861ad6 --- /dev/null +++ b/client/main.c @@ -0,0 +1,31 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2012 Intel Corporation. All rights reserved. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/configure.ac b/configure.ac index 0ae5c2c26..cfead7f92 100644 --- a/configure.ac +++ b/configure.ac @@ -167,6 +167,11 @@ AC_SUBST(ICAL_CFLAGS) AC_SUBST(ICAL_LIBS) AM_CONDITIONAL(OBEX, test "${enable_obex}" != "no") +AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client], + [disable command line client]), [enable_client=${enableval}]) +AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no" && + test "${enable_readline}" != "no") + AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles], [do not install configuration and data files]), [enable_datafiles=${enableval}]) -- 2.47.3