aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2011-10-29 18:30:39 +0200
committerSimon Busch <morphis@gravedo.de>2011-10-29 18:38:31 +0200
commitd74590f98e59ad6c4fcbef8b9fabcce0f84659f0 (patch)
tree4a0fbe5000098efb39ff239588b6d67dadffc5e7
parent4023f332abcfad3c0d0ce91d8dd51cd6134b40a0 (diff)
downloadexternal_libsamsung-ipc-d74590f98e59ad6c4fcbef8b9fabcce0f84659f0.zip
external_libsamsung-ipc-d74590f98e59ad6c4fcbef8b9fabcce0f84659f0.tar.gz
external_libsamsung-ipc-d74590f98e59ad6c4fcbef8b9fabcce0f84659f0.tar.bz2
fix autotools setup to support the new device specific structure
Signed-off-by: Simon Busch <morphis@gravedo.de>
-rw-r--r--configure.ac57
-rw-r--r--samsung-ipc/Makefile.am21
2 files changed, 70 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 6d3f578..3e13768 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
AC_INIT([libsamsung-ipc], [0.1.0], [smartphones-userland@linuxtogo.org], [libsamsung-ipc])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_CC
@@ -22,6 +22,14 @@ OPENSSL_REQUIRED=0.0.0
PKG_PROG_PKG_CONFIG
#------------------------------------------------------------------------------
+# protocol version we're building for
+
+AC_ARG_WITH(protocol-version, [ --with-protocol-version=NAME Version of the IPC protocol we're building libsamsung-ipc for],
+ [v=$withval;protocol_version=$v], [protocol_version=crespo])
+AM_CONDITIONAL([WANT_PROTOCOL_VERISON_CRESPO], [test x"$protocol_version" = x"crespo"])
+AM_CONDITIONAL([WANT_PROTOCOL_VERISON_H1], [test x"$protocol_version" = x"h1"])
+
+#------------------------------------------------------------------------------
# openssl
PKG_CHECK_MODULES(OPENSSL, openssl >= OPENSSL_REQUIRED)
@@ -29,12 +37,49 @@ AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
#------------------------------------------------------------------------------
+# check for debugging
+AC_ARG_ENABLE(debug,
+ [ --enable-debug Enable debug build (default=disabled)],
+ [debug=$enableval],
+ [debug="no"])
+AM_CONDITIONAL( [WANT_DEBUG], [test x"$debug" = x"yes"])
+
+
+#------------------------------------------------------------------------------
+# git version
+GITV=`cat .git/refs/heads/master || echo "unknown"`
+AC_DEFINE_UNQUOTED([PACKAGE_GITV], ["${GITV}"], [git version])
+
+#------------------------------------------------------------------------------
AC_CONFIG_FILES([
- Makefile
- samsung-ipc-1.0.pc
- include/Makefile
- samsung-ipc/Makefile
- tools/Makefile
+ Makefile
+ samsung-ipc-1.0.pc
+ include/Makefile
+ samsung-ipc/Makefile
+ tools/Makefile
])
AC_OUTPUT
+
+#------------------------------------------------------------------------------
+# info
+
+echo
+echo
+echo
+echo "------------------------------------------------------------------------"
+echo "$PACKAGE_NAME $PACKAGE_VERSION-$GITV"
+echo "------------------------------------------------------------------------"
+echo
+echo "Configuration Options:"
+echo
+echo " protocol version........: $protocol_version"
+echo
+echo " debug build.............: $debug"
+echo
+echo " prefix..................: $prefix"
+echo
+echo "------------------------------------------------------------------------"
+echo
+echo "Now type 'make' to compile and 'make install' to install this package."
+
diff --git a/samsung-ipc/Makefile.am b/samsung-ipc/Makefile.am
index b26ba56..841d9d9 100644
--- a/samsung-ipc/Makefile.am
+++ b/samsung-ipc/Makefile.am
@@ -6,21 +6,38 @@ AM_CFLAGS = \
$(OPENSSL_CFLAGS) \
$(NULL)
+if WANT_DEBUG
+AM_CFLAGS += -ggdb -O0
+endif
+
lib_LTLIBRARIES = \
libsamsung-ipc.la \
$(NULL)
libsamsung_ipc_la_SOURCES = \
- crespo_ipc.c \
- crespo_nv_data.c \
ipc.c \
ipc_util.c \
util.c \
+ \
misc.c \
sec.c \
gprs.c \
call.c \
+ net.c \
+ $(NULL)
+
+if WANT_PROTOCOL_VERISON_CRESPO
+libsamsung_ipc_la_SOURCES += \
+ device/crespo/crespo_ipc.c \
+ device/crespo/crespo_nv_data.c \
+ $(NULL)
+endif
+
+if WANT_PROTOCOL_VERISON_H1
+libsamsung_ipc_la_SOURCES += \
+ device/h1/h1_ipc.c \
$(NULL)
+endif
libsamsung_ipc_la_LIBADD = \
$(OPENSSL_LIBS) \