summaryrefslogtreecommitdiff
path: root/src/dhcp-manager
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-05-06 14:18:26 -0400
committerDan Winship <danw@gnome.org>2013-05-08 15:07:18 -0400
commitc4417c71b64fd11064184676ca73b51c05c20e3f (patch)
tree62164464032a0e8c1133e77c9b2f995274a08525 /src/dhcp-manager
parent6c2a35a090d25e3ff05c8b3c07191be6324ddc70 (diff)
downloadNetworkManager-c4417c71b64fd11064184676ca73b51c05c20e3f.tar.gz
core: use non-recursive build
Although having different parts of NM in different subdirectories keeps the source tree neat, it has made the build messy, particularly because of cross-dependencies between the subdirs. Reorganize to build all of the pieces of the NetworkManager binary from src/Makefile, and only use recursive make for test programs, helper binaries, and plugins. As part of this, get rid of all the per-directory convenience libraries, and switch to building a single top-level libNetworkManager.la, containing everything except main.c, which all of the test programs can then link against.
Diffstat (limited to 'src/dhcp-manager')
-rw-r--r--src/dhcp-manager/Makefile.am73
-rw-r--r--src/dhcp-manager/tests/Makefile.am9
2 files changed, 1 insertions, 81 deletions
diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am
index d1faf4ab5c..000e5ca58c 100644
--- a/src/dhcp-manager/Makefile.am
+++ b/src/dhcp-manager/Makefile.am
@@ -1,76 +1,3 @@
-SUBDIRS = . tests
-
-INCLUDES = \
- -I${top_srcdir} \
- -I${top_builddir}/include \
- -I${top_srcdir}/include \
- -I${top_builddir}/src/generated \
- -I${top_srcdir}/src/generated \
- -I${top_srcdir}/src/logging \
- -I${top_srcdir}/src/config \
- -I${top_srcdir}/src/posix-signals \
- -I${top_builddir}/libnm-util \
- -I${top_srcdir}/libnm-util \
- -I${top_srcdir}/src
-
-noinst_LTLIBRARIES = libdhcp-manager.la libdhcp-dhclient.la
-
-################## dhclient ##################
-
-libdhcp_dhclient_la_SOURCES = \
- nm-dhcp-dhclient-utils.h \
- nm-dhcp-dhclient-utils.c \
- nm-dhcp-dhclient.h \
- nm-dhcp-dhclient.c
-
-libdhcp_dhclient_la_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GLIB_CFLAGS) \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DLOCALSTATEDIR=\"$(localstatedir)\" \
- -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \
- -DNMSTATEDIR=\"$(nmstatedir)\" \
- -DNMCONFDIR=\"$(nmconfdir)\"
-
-libdhcp_dhclient_la_LIBADD = \
- $(top_builddir)/src/logging/libnm-logging.la \
- $(top_builddir)/src/posix-signals/libnm-posix-signals.la \
- $(top_builddir)/libnm-util/libnm-util.la \
- $(DBUS_LIBS) \
- $(GLIB_LIBS)
-
-################## main lib ##################
-
-libdhcp_manager_la_SOURCES = \
- nm-dhcp-client.c \
- nm-dhcp-client.h \
- nm-dhcp-manager.c \
- nm-dhcp-manager.h \
- nm-dhcp-dhcpcd.h \
- nm-dhcp-dhcpcd.c
-
-libdhcp_manager_la_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GLIB_CFLAGS) \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DLOCALSTATEDIR=\"$(localstatedir)\" \
- -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \
- -DDHCPCD_PATH=\"$(DHCPCD_PATH)\" \
- -DNMSTATEDIR=\"$(nmstatedir)\" \
- -DNMRUNDIR=\"$(nmrundir)\"
-
-libdhcp_manager_la_LIBADD = \
- $(top_builddir)/src/logging/libnm-logging.la \
- $(top_builddir)/src/config/libnm-config.la \
- $(top_builddir)/src/posix-signals/libnm-posix-signals.la \
- $(builddir)/libdhcp-dhclient.la \
- $(DBUS_LIBS) \
- $(GLIB_LIBS)
-
-################### dhclient helper ###################
-
libexec_PROGRAMS = nm-dhcp-helper
nm_dhcp_helper_SOURCES = nm-dhcp-helper.c
diff --git a/src/dhcp-manager/tests/Makefile.am b/src/dhcp-manager/tests/Makefile.am
index 8c9d06c155..e9b958fbbc 100644
--- a/src/dhcp-manager/tests/Makefile.am
+++ b/src/dhcp-manager/tests/Makefile.am
@@ -1,5 +1,3 @@
-if ENABLE_TESTS
-
INCLUDES = \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
@@ -19,16 +17,11 @@ test_dhcp_dhclient_CPPFLAGS = \
-DTESTDIR="\"$(abs_srcdir)\""
test_dhcp_dhclient_LDADD = \
- -ldl \
- $(top_builddir)/src/dhcp-manager/libdhcp-dhclient.la \
- $(top_builddir)/libnm-util/libnm-util.la \
- $(GLIB_LIBS)
+ $(top_builddir)/src/libNetworkManager.la
check-local: test-dhcp-dhclient
$(abs_builddir)/test-dhcp-dhclient
-endif
-
EXTRA_DIST = \
test-dhclient-duid.leases \
test-dhclient-commented-duid.leases