summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--test/Makefile.am8
-rw-r--r--test/main.c38
3 files changed, 47 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 1c6a27d..96ecc7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@ src/obexd
src/obexd.service
client/obex-client
client/obex-client.service
+test/obex-test
diff --git a/test/Makefile.am b/test/Makefile.am
index 915d343..79ada83 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,4 +1,12 @@
+noinst_PROGRAMS = obex-test
+
+obex_test_SOURCES = main.c
+
+obex_test_LDADD = @GWOBEX_LIBS@ @OPENOBEX_LIBS@ @BLUEZ_LIBS@ @GLIB_LIBS@
+
+AM_CFLAGS = @GLIB_CFLAGS@ @BLUEZ_CFLAGS@ @OPENOBEX_CFLAGS@ @GWOBEX_CFLAGS@
+
EXTRA_DIST = send-files simple-agent
MAINTAINERCLEANFILES = Makefile.in
diff --git a/test/main.c b/test/main.c
new file mode 100644
index 0000000..b0db262
--- /dev/null
+++ b/test/main.c
@@ -0,0 +1,38 @@
+/*
+ *
+ * OBEX Test
+ *
+ * Copyright (C) 2007-2008 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * 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 <config.h>
+#endif
+
+#include <glib.h>
+
+int main(int argc, char *argv[])
+{
+#ifdef NEED_THREADS
+ if (g_thread_supported() == FALSE)
+ g_thread_init(NULL);
+#endif
+
+ return 0;
+}