From 67485148043a805954bb8547504e1ca400218f57 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 27 Apr 2014 16:12:54 -0700 Subject: [PATCH] build: Add support for internal ELL compilation --- .gitignore | 8 ++------ Makefile.am | 45 ++++++++++++++++++++++++++++++++++++++++++--- bootstrap | 6 +++++- configure.ac | 19 ++++++++++++++++--- 4 files changed, 65 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 46360320..f4ce6583 100644 --- a/.gitignore +++ b/.gitignore @@ -7,18 +7,14 @@ Makefile Makefile.in aclocal.m4 -config.guess config.h config.h.in config.log config.status config.sub configure -depcomp -compile -install-sh libtool -ltmain.sh -missing stamp-h1 +build-aux autom4te.cache +ell diff --git a/Makefile.am b/Makefile.am index 3821da88..1d2e5655 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,45 @@ AM_MAKEFLAGS = --no-print-directory -MAINTAINERCLEANFILES = Makefile.in \ - aclocal.m4 configure config.h.in config.sub config.guess \ - ltmain.sh depcomp compile missing install-sh mkinstalldirs +ACLOCAL_AMFLAGS = -I build-aux + +noinst_LTLIBRARIES = ell/libell-internal.la + +ell_sources = ell/ell.h ell/private.h \ + ell/util.h ell/util.c \ + ell/test.h ell/test.c \ + ell/queue.h ell/queue.c \ + ell/hashmap.h ell/hashmap.c \ + ell/string.h ell/string.c \ + ell/settings.h ell/settings.c \ + ell/main.h ell/main.c \ + ell/idle.h ell/idle.c \ + ell/signal.h ell/signal.c \ + ell/timeout.h ell/timeout.c \ + ell/io.h ell/io.c \ + ell/log.h ell/log.c \ + ell/plugin.h ell/plugin.c \ + ell/checksum.h ell/checksum.c \ + ell/netlink.h ell/netlink.c \ + ell/dbus-private.h \ + ell/dbus.h ell/dbus.c \ + ell/dbus-service.h ell/dbus-service.c + +ell_libell_internal_la_SOURCES = $(ell_sources) + +AM_CFLAGS = -fvisibility=hidden + +MAINTAINERCLEANFILES = Makefile.in configure \ + config.h.in aclocal.m4 build-aux/* $(ell_sources) + +DISTCLEANFILES = $(BUILT_SOURCES) + +BUILT_SOURCES = ell/internal + +ell/internal: Makefile + $(AM_V_at)$(MKDIR_P) ell + $(AM_V_GEN)for f in $(ell_sources) ; do \ + if [ ! -f $$f ] ; then \ + $(LN_S) -t ell -f $(top_srcdir)/../../ell/$$f ; \ + fi \ + done > $@ diff --git a/bootstrap b/bootstrap index 54516bcf..aee4c08c 100755 --- a/bootstrap +++ b/bootstrap @@ -1,3 +1,7 @@ #!/bin/sh -autoreconf --force --install +if [ ! -d build-aux ]; then + mkdir build-aux +fi + +autoreconf --force --install --symlink diff --git a/configure.ac b/configure.ac index 56bc80d0..0ffb9813 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,12 @@ AC_PREREQ(2.60) AC_INIT(iwd, 0.0) +AC_CONFIG_HEADERS(config.h) +AC_CONFIG_AUX_DIR(build-aux) +AC_CONFIG_MACRO_DIR(build-aux) + AM_INIT_AUTOMAKE([foreign subdir-objects color-tests silent-rules tar-pax no-dist-gzip dist-xz]) -AC_CONFIG_HEADERS(config.h) -AC_USE_SYSTEM_EXTENSIONS m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -14,5 +16,16 @@ AC_PREFIX_DEFAULT(/usr/local) AC_PROG_CC AC_PROG_INSTALL +AC_PROG_MKDIR_P +AC_PROG_LN_S -AC_OUTPUT(Makefile) +LT_PREREQ(2.2) +LT_INIT([disable-static]) + +AC_CONFIG_FILES(Makefile) + +AC_OUTPUT + +AC_MSG_RESULT([ + $PACKAGE_NAME $VERSION +])