Revamp build system to make it easier to integrate openflowext.
[sliver-openvswitch.git] / Makefile.am
index 658070b..e165359 100644 (file)
@@ -1,26 +1,8 @@
 # The goal of -Wno-syntax here is just to suppress the Automake warning
 # about overriding distdir, below.
-AUTOMAKE_OPTIONS=foreign -Wno-syntax
-ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = \
-       lib \
-       datapath \
-       secchan \
-       controller \
-       utilities \
-       switch \
-       tests \
-       include \
-       third-party \
-       debian
-if HAVE_EXT
-SUBDIRS += $(EXT)
-distdir = $(PACKAGE)+ext-$(VERSION)
-endif
-
-DIST_SUBDIRS = $(SUBDIRS)
-
-EXTRA_DIST = README.hwtables
+AUTOMAKE_OPTIONS = foreign -Wno-syntax subdir-objects
+ACLOCAL_AMFLAGS = -I m4 -I ext/m4
+SUBDIRS = datapath
 
 if HAVE_DPKG_BUILDPACKAGE
 distcheck-hook: 
@@ -29,3 +11,53 @@ distcheck-hook:
 else
 distcheck-hook: 
 endif
+
+AM_CPPFLAGS = $(SSL_CFLAGS)
+AM_CPPFLAGS += -I $(top_srcdir)/include
+if HAVE_EXT
+AM_CPPFLAGS += -I $(top_srcdir)/ext/include
+endif
+
+AM_CFLAGS = -DVERSION=\"$(VERSION)\"
+AM_CFLAGS += -Wstrict-prototypes
+
+rundir = $(localstatedir)/run
+AM_CFLAGS += -DRUNDIR=\"$(rundir)\"
+
+if NDEBUG
+AM_CFLAGS += -DNDEBUG -fomit-frame-pointer
+else
+AM_LDFLAGS = -export-dynamic
+endif
+
+DISTCLEANFILES =
+EXTRA_DIST =
+TESTS =
+TESTS_ENVIRONMENT =
+bin_PROGRAMS =
+bin_SCRIPTS =
+dist_man_MANS =
+man_MANS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+noinst_PROGRAMS =
+noinst_SCRIPTS =
+
+do_subst = sed -e 's,[@]pkidir[@],$(pkidir),g' \
+               -e 's,[@]rundir[@],$(rundir),g' \
+               -e 's,[@]PERL[@],$(PERL),g'
+ro_script = sed "`printf '1a\\' && printf '\\n\# -*- buffer-read-only: t -*-'`"
+ro_man = printf '.\\" Local variables:\n.\\" buffer-read-only: t\n.\\" End:\n'
+
+EXTRA_DIST += README.hwtables
+
+include lib/automake.mk
+include secchan/automake.mk
+include controller/automake.mk
+include utilities/automake.mk
+include switch/automake.mk
+include tests/automake.mk
+include include/automake.mk
+include third-party/automake.mk
+include debian/automake.mk
+include ext/automake.mk