From: Ben Pfaff Date: Thu, 16 Oct 2008 18:11:59 +0000 (-0700) Subject: Revamp build system to make it easier to integrate openflowext. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fbcabe10406118bb1856772cd7fbfb2a193869b;p=openvswitch Revamp build system to make it easier to integrate openflowext. --- diff --git a/Make.vars b/Make.vars index 37727732..6e495d84 100644 --- a/Make.vars +++ b/Make.vars @@ -1,25 +1,2 @@ # -*- makefile -*- -AM_CPPFLAGS = $(SSL_CFLAGS) -AM_CPPFLAGS += -I $(ofp_top_srcdir)/include -if HAVE_EXT -AM_CPPFLAGS += -I $(ofp_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 - -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' diff --git a/Makefile.am b/Makefile.am index 658070b3..e165359a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/acinclude.m4 b/acinclude.m4 index 0c016a8d..dd7a5271 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -126,17 +126,14 @@ AC_DEFUN([OFP_ENABLE_EXT], ;; esac if test $HAVE_EXT = yes; then - if test -e "$srcdir/ext/configure"; then + if test -e "$srcdir/ext/automake.mk"; then : else AC_MSG_ERROR([cannot configure extensions without "ext" directory]) fi - AC_CONFIG_SUBDIRS([ext]) AC_DEFINE([HAVE_EXT], [1], [Whether the OpenFlow extensions submodule is available]) - AC_SUBST([EXT], [ext]) fi - AC_SUBST([ofp_top_srcdir], ['$(top_srcdir)']) AM_CONDITIONAL([HAVE_EXT], [test $HAVE_EXT = yes])]) dnl Checks for dpkg-buildpackage. If this is available then we check diff --git a/boot.sh b/boot.sh index f616e766..d39ba903 100755 --- a/boot.sh +++ b/boot.sh @@ -1,10 +1,44 @@ -#!/bin/sh +#! /bin/sh -e + +have_ext=$(if test -e ext/automake.mk; then echo yes; else echo no; fi) +for opt +do + case $opt in + (--enable-ext) have_ext=yes ;; + (--disable-ext) have_ext=no ;; + (--help) cat < debian/Makefile.am + echo 'EXTRA_DIST += \' && + git ls-files debian | grep -v '^debian/\.gitignore$' | + sed -e 's/\(.*\)/ \1 \\/' -e '$s/ \\//') > debian/automake.mk + +# Find the "include ext/automake.mk" line in Makefile.am and comment +# it out or in according to whether ext is available, and similarly +# for "m4_include(ext/configure.m4)" in configure.ac. +if test "$have_ext" = yes; then + echo 'Enabling openflowext...' + perl -i.bak -pe 's|^#(include ext/automake\.mk)$|$1|' Makefile.am + perl -i.bak -pe 's|^#(m4_include\(ext/configure\.m4\))$|$1|' configure.ac +else + echo 'Disabling openflowext...' + perl -i.bak -pe 's|^(include ext/automake\.mk)$|#$1|' Makefile.am + perl -i.bak -pe 's|^(m4_include\(ext/configure\.m4\))$|#$1|' configure.ac +fi # Bootstrap configure system from .ac/.am files autoreconf --install -I config --force diff --git a/configure.ac b/configure.ac index aa1ce99f..7908a59c 100644 --- a/configure.ac +++ b/configure.ac @@ -34,11 +34,13 @@ AC_PREREQ(2.59) AC_INIT(openflow, 0.9.0~b1, info@openflowswitch.org) AC_CONFIG_SRCDIR([README.hwtables]) AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_MACRO_DIR([ext/m4]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE AC_PROG_CC +AM_PROG_CC_C_O AC_PROG_CPP AC_PROG_RANLIB @@ -62,18 +64,10 @@ OFP_CHECK_DPKG_BUILDPACKAGE CFLAGS="$CFLAGS -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement" OFP_ENABLE_EXT +m4_include(ext/configure.m4) AC_CONFIG_FILES([Makefile datapath/Makefile -lib/Makefile -include/Makefile -controller/Makefile -utilities/Makefile -secchan/Makefile -switch/Makefile -tests/Makefile -third-party/Makefile -debian/Makefile datapath/linux-2.6/Kbuild datapath/linux-2.6/Makefile datapath/linux-2.6/Makefile.main diff --git a/controller/Makefile.am b/controller/Makefile.am deleted file mode 100644 index 81863ff3..00000000 --- a/controller/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -include ../Make.vars - -bin_PROGRAMS = controller -man_MANS = controller.8 -DISTCLEANFILES = controller.8 - -controller_SOURCES = controller.c -controller_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) - -EXTRA_DIST = controller.8.in -controller.8: controller.8.in Makefile - ($(do_subst) && $(ro_man)) < $(srcdir)/controller.8.in > controller.8 diff --git a/controller/automake.mk b/controller/automake.mk new file mode 100644 index 00000000..b6c2291a --- /dev/null +++ b/controller/automake.mk @@ -0,0 +1,12 @@ +bin_PROGRAMS += controller/controller +man_MANS += controller/controller.8 +DISTCLEANFILES += controller/controller.8 + +controller_controller_SOURCES = controller/controller.c +controller_controller_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) + +EXTRA_DIST += controller/controller.8.in +controller/controller.8: controller/controller.8.in Makefile + ($(do_subst) && $(ro_man)) \ + < $(srcdir)/controller/controller.8.in \ + > controller/controller.8 diff --git a/debian/.gitignore b/debian/.gitignore index 10e0728a..1e6be8eb 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -1,7 +1,6 @@ *.debhelper *.substvars -/Makefile.am -/Makefile.in +/automake.mk /files /openflow /openflow-common diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index 2d5fa862..00000000 --- a/include/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -noinst_HEADERS = \ - command-line.h \ - compiler.h \ - csum.h \ - daemon.h \ - dhcp-client.h \ - dhcp.h \ - dynamic-string.h \ - dpif.h \ - fatal-signal.h \ - fault.h \ - flow.h \ - hash.h \ - learning-switch.h \ - list.h \ - mac-learning.h \ - netdev.h \ - netlink-protocol.h \ - netlink.h \ - nicira-ext.h \ - ofpbuf.h \ - ofp-print.h \ - openflow.h \ - openflow-netlink.h \ - packets.h \ - poll-loop.h \ - port-array.h \ - queue.h \ - random.h \ - rconn.h \ - sat-math.h \ - socket-util.h \ - type-props.h \ - timeval.h \ - stp.h \ - util.h \ - vconn.h \ - vconn-provider.h \ - vconn-ssl.h \ - vconn-stream.h \ - vlog-socket.h \ - vlog-modules.def \ - vlog.h \ - xtoxll.h diff --git a/include/automake.mk b/include/automake.mk new file mode 100644 index 00000000..a86dcc0b --- /dev/null +++ b/include/automake.mk @@ -0,0 +1,44 @@ +noinst_HEADERS += \ + include/command-line.h \ + include/compiler.h \ + include/csum.h \ + include/daemon.h \ + include/dhcp-client.h \ + include/dhcp.h \ + include/dynamic-string.h \ + include/dpif.h \ + include/fatal-signal.h \ + include/fault.h \ + include/flow.h \ + include/hash.h \ + include/learning-switch.h \ + include/list.h \ + include/mac-learning.h \ + include/netdev.h \ + include/netlink-protocol.h \ + include/netlink.h \ + include/nicira-ext.h \ + include/ofpbuf.h \ + include/ofp-print.h \ + include/openflow.h \ + include/openflow-netlink.h \ + include/packets.h \ + include/poll-loop.h \ + include/port-array.h \ + include/queue.h \ + include/random.h \ + include/rconn.h \ + include/sat-math.h \ + include/socket-util.h \ + include/type-props.h \ + include/timeval.h \ + include/stp.h \ + include/util.h \ + include/vconn.h \ + include/vconn-provider.h \ + include/vconn-ssl.h \ + include/vconn-stream.h \ + include/vlog-socket.h \ + include/vlog-modules.def \ + include/vlog.h \ + include/xtoxll.h diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index 0e258281..00000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -include ../Make.vars - -noinst_LIBRARIES = libopenflow.a - -libopenflow_a_SOURCES = \ - command-line.c \ - csum.c \ - daemon.c \ - dhcp-client.c \ - dhcp.c \ - dynamic-string.c \ - fatal-signal.c \ - fault.c \ - flow.c \ - hash.c \ - learning-switch.c \ - list.c \ - mac-learning.c \ - netdev.c \ - ofpbuf.c \ - ofp-print.c \ - poll-loop.c \ - port-array.c \ - queue.c \ - random.c \ - rconn.c \ - socket-util.c \ - timeval.c \ - stp.c \ - util.c \ - vconn-tcp.c \ - vconn-unix.c \ - vconn-stream.c \ - vconn.c \ - vlog-socket.c \ - vlog.c - -if HAVE_NETLINK -libopenflow_a_SOURCES += \ - dpif.c \ - netlink.c \ - vconn-netlink.c -endif - -if HAVE_OPENSSL -libopenflow_a_SOURCES += \ - vconn-ssl.c -nodist_libopenflow_a_SOURCES = dhparams.c -dhparams.c: dh1024.pem dh2048.pem dh4096.pem - (echo '#include "dhparams.h"' && \ - openssl dhparam -C -in $(srcdir)/dh1024.pem -noout && \ - openssl dhparam -C -in $(srcdir)/dh2048.pem -noout && \ - openssl dhparam -C -in $(srcdir)/dh4096.pem -noout) \ - | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > dhparams.c.tmp - mv dhparams.c.tmp dhparams.c -endif - -EXTRA_DIST = dh1024.pem dh2048.pem dh4096.pem dhparams.h diff --git a/lib/automake.mk b/lib/automake.mk new file mode 100644 index 00000000..119fb61a --- /dev/null +++ b/lib/automake.mk @@ -0,0 +1,60 @@ +noinst_LIBRARIES += lib/libopenflow.a + +lib_libopenflow_a_SOURCES = \ + lib/command-line.c \ + lib/csum.c \ + lib/daemon.c \ + lib/dhcp-client.c \ + lib/dhcp.c \ + lib/dynamic-string.c \ + lib/fatal-signal.c \ + lib/fault.c \ + lib/flow.c \ + lib/hash.c \ + lib/learning-switch.c \ + lib/list.c \ + lib/mac-learning.c \ + lib/netdev.c \ + lib/ofpbuf.c \ + lib/ofp-print.c \ + lib/poll-loop.c \ + lib/port-array.c \ + lib/queue.c \ + lib/random.c \ + lib/rconn.c \ + lib/socket-util.c \ + lib/timeval.c \ + lib/stp.c \ + lib/util.c \ + lib/vconn-tcp.c \ + lib/vconn-unix.c \ + lib/vconn-stream.c \ + lib/vconn.c \ + lib/vlog-socket.c \ + lib/vlog.c + +if HAVE_NETLINK +lib_libopenflow_a_SOURCES += \ + lib/dpif.c \ + lib/netlink.c \ + lib/vconn-netlink.c +endif + +if HAVE_OPENSSL +lib_libopenflow_a_SOURCES += \ + lib/vconn-ssl.c +nodist_lib_libopenflow_a_SOURCES = lib/dhparams.c +lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem + (echo '#include "dhparams.h"' && \ + openssl dhparam -C -in $(srcdir)/dh1024.pem -noout && \ + openssl dhparam -C -in $(srcdir)/dh2048.pem -noout && \ + openssl dhparam -C -in $(srcdir)/dh4096.pem -noout) \ + | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp + mv lib/dhparams.c.tmp lib/dhparams.c +endif + +EXTRA_DIST += \ + lib/dh1024.pem \ + lib/dh2048.pem \ + lib/dh4096.pem \ + lib/dhparams.h diff --git a/secchan/Makefile.am b/secchan/Makefile.am deleted file mode 100644 index bedb286b..00000000 --- a/secchan/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -include ../Make.vars - -if HAVE_NETLINK -bin_PROGRAMS = secchan -man_MANS = secchan.8 -else -bin_PROGRAMS = -man_MANS = -endif - -secchan_SOURCES = secchan.c -secchan_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) - -EXTRA_DIST = secchan.8.in -DISTCLEANFILES = secchan.8 -secchan.8: secchan.8.in Makefile - ($(do_subst) && $(ro_man)) < $(srcdir)/secchan.8.in > secchan.8 diff --git a/secchan/automake.mk b/secchan/automake.mk new file mode 100644 index 00000000..3c57d7f8 --- /dev/null +++ b/secchan/automake.mk @@ -0,0 +1,11 @@ +bin_PROGRAMS += secchan/secchan +man_MANS += secchan/secchan.8 + +secchan_secchan_SOURCES = secchan/secchan.c +secchan_secchan_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) + +EXTRA_DIST += secchan/secchan.8.in +DISTCLEANFILES += secchan/secchan.8 +secchan/secchan.8: secchan/secchan.8.in Makefile + ($(do_subst) && $(ro_man)) \ + < $(srcdir)/secchan/secchan.8.in > secchan/secchan.8 diff --git a/switch/Makefile.am b/switch/Makefile.am deleted file mode 100644 index 620db5d3..00000000 --- a/switch/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -include ../Make.vars - -bin_PROGRAMS = switch -man_MANS = switch.8 - -switch_SOURCES = \ - chain.c \ - chain.h \ - crc32.c \ - crc32.h \ - datapath.c \ - datapath.h \ - dp_act.c \ - dp_act.h \ - nx_act.c \ - nx_act.h \ - switch.c \ - switch-flow.c \ - switch-flow.h \ - table.h \ - table-hash.c \ - table-linear.c - -switch_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) - -EXTRA_DIST = switch.8.in -DISTCLEANFILES = switch.8 -switch.8: switch.8.in Makefile - ($(do_subst) && $(ro_man)) < $(srcdir)/switch.8.in > switch.8 diff --git a/switch/automake.mk b/switch/automake.mk new file mode 100644 index 00000000..58e13c9d --- /dev/null +++ b/switch/automake.mk @@ -0,0 +1,28 @@ +bin_PROGRAMS += switch/switch +man_MANS += switch/switch.8 + +switch_switch_SOURCES = \ + switch/chain.c \ + switch/chain.h \ + switch/crc32.c \ + switch/crc32.h \ + switch/datapath.c \ + switch/datapath.h \ + switch/dp_act.c \ + switch/dp_act.h \ + switch/nx_act.c \ + switch/nx_act.h \ + switch/switch.c \ + switch/switch-flow.c \ + switch/switch-flow.h \ + switch/table.h \ + switch/table-hash.c \ + switch/table-linear.c + +switch_switch_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) + +EXTRA_DIST += switch/switch.8.in +DISTCLEANFILES += switch/switch.8 +switch/switch.8: switch/switch.8.in Makefile + ($(do_subst) && $(ro_man)) \ + < $(srcdir)/switch/switch.8.in > switch/switch.8 diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index e3981bfd..00000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -include ../Make.vars - -TESTS = test-list -noinst_PROGRAMS = test-list -test_list_SOURCES = test-list.c -test_list_LDADD = ../lib/libopenflow.a - -TESTS += test-type-props -noinst_PROGRAMS += test-type-props -test_type_props_SOURCES = test-type-props.c - -noinst_PROGRAMS += test-dhcp-client -test_dhcp_client_SOURCES = test-dhcp-client.c -test_dhcp_client_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) - -TESTS += test-stp.sh -EXTRA_DIST = test-stp.sh -noinst_PROGRAMS += test-stp - -test_stp_SOURCES = test-stp.c -test_stp_LDADD = ../lib/libopenflow.a -stp_files = \ - test-stp-ieee802.1d-1998 \ - test-stp-ieee802.1d-2004-fig17.4 \ - test-stp-ieee802.1d-2004-fig17.6 \ - test-stp-ieee802.1d-2004-fig17.7 \ - test-stp-iol-op-1.1 \ - test-stp-iol-op-1.4 \ - test-stp-iol-op-3.1 \ - test-stp-iol-op-3.3 \ - test-stp-iol-io-1.1 \ - test-stp-iol-io-1.2 \ - test-stp-iol-io-1.4 \ - test-stp-iol-io-1.5 -TESTS_ENVIRONMENT = stp_files='$(stp_files)' - -EXTRA_DIST += $(stp_files) diff --git a/tests/automake.mk b/tests/automake.mk new file mode 100644 index 00000000..0c7edd16 --- /dev/null +++ b/tests/automake.mk @@ -0,0 +1,35 @@ +TESTS += tests/test-list +noinst_PROGRAMS += tests/test-list +tests_test_list_SOURCES = tests/test-list.c +tests_test_list_LDADD = lib/libopenflow.a + +TESTS += tests/test-type-props +noinst_PROGRAMS += tests/test-type-props +tests_test_type_props_SOURCES = tests/test-type-props.c + +noinst_PROGRAMS += tests/test-dhcp-client +tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c +tests_test_dhcp_client_LDADD = lib/libopenflow.a $(FAULT_LIBS) + +TESTS += tests/test-stp.sh +EXTRA_DIST += tests/test-stp.sh +noinst_PROGRAMS += tests/test-stp + +tests_test_stp_SOURCES = tests/test-stp.c +tests_test_stp_LDADD = lib/libopenflow.a +stp_files = \ + tests/test-stp-ieee802.1d-1998 \ + tests/test-stp-ieee802.1d-2004-fig17.4 \ + tests/test-stp-ieee802.1d-2004-fig17.6 \ + tests/test-stp-ieee802.1d-2004-fig17.7 \ + tests/test-stp-iol-op-1.1 \ + tests/test-stp-iol-op-1.4 \ + tests/test-stp-iol-op-3.1 \ + tests/test-stp-iol-op-3.3 \ + tests/test-stp-iol-io-1.1 \ + tests/test-stp-iol-io-1.2 \ + tests/test-stp-iol-io-1.4 \ + tests/test-stp-iol-io-1.5 +TESTS_ENVIRONMENT += stp_files='$(stp_files)' + +EXTRA_DIST += $(stp_files) diff --git a/tests/test-stp.sh b/tests/test-stp.sh index 8d0f5388..fd6acf54 100755 --- a/tests/test-stp.sh +++ b/tests/test-stp.sh @@ -3,5 +3,5 @@ set -e progress= for d in ${stp_files}; do echo "Testing $d..." - $SUPERVISOR ./test-stp ${srcdir}/$d + $SUPERVISOR ./tests/test-stp ${srcdir}/$d done diff --git a/third-party/Makefile.am b/third-party/Makefile.am deleted file mode 100644 index 587a7e8c..00000000 --- a/third-party/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = README ofp-tcpdump.patch diff --git a/third-party/automake.mk b/third-party/automake.mk new file mode 100644 index 00000000..02636bb5 --- /dev/null +++ b/third-party/automake.mk @@ -0,0 +1,3 @@ +EXTRA_DIST += \ + third-party/README \ + third-party/ofp-tcpdump.patch diff --git a/utilities/Makefile.am b/utilities/Makefile.am deleted file mode 100644 index 0d682fee..00000000 --- a/utilities/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -include ../Make.vars - -bin_PROGRAMS = vlogconf dpctl ofp-discover ofp-kill -bin_SCRIPTS = ofp-pki -noinst_SCRIPTS = ofp-pki-cgi - -EXTRA_DIST = ofp-pki.in ofp-pki-cgi.in ofp-pki.8.in ofp-discover.8.in \ -ofp-kill.8.in -DISTCLEANFILES = ofp-pki ofp-pki-cgi ofp-pki.8 ofp-discover.8 ofp-kill.8 - -dist_man_MANS = vlogconf.8 dpctl.8 -man_MANS = ofp-pki.8 ofp-discover.8 ofp-kill.8 - -dpctl_SOURCES = dpctl.c -dpctl_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) - -vlogconf_SOURCES = vlogconf.c -vlogconf_LDADD = ../lib/libopenflow.a - -ofp_discover_SOURCES = ofp-discover.c -ofp_discover_LDADD = ../lib/libopenflow.a - -ofp_kill_SOURCES = ofp-kill.c -ofp_kill_LDADD = ../lib/libopenflow.a - -pkidir = $(pkgdatadir)/pki - -ofp-pki: ofp-pki.in Makefile - $(do_subst) < $(srcdir)/ofp-pki.in | $(ro_script) > ofp-pki - chmod +x ofp-pki -ofp-pki-cgi: ofp-pki-cgi.in Makefile - $(do_subst) < $(srcdir)/ofp-pki-cgi.in | $(ro_script) > ofp-pki-cgi - chmod +x ofp-pki-cgi -ofp-pki.8: ofp-pki.8.in Makefile - ($(do_subst) && $(ro_man)) < $(srcdir)/ofp-pki.8.in > ofp-pki.8 -ofp-discover.8: ofp-discover.8.in Makefile - ($(do_subst) && $(ro_man)) < $(srcdir)/ofp-discover.8.in > ofp-discover.8 -ofp-kill.8: ofp-kill.8.in Makefile - ($(do_subst) && $(ro_man)) < $(srcdir)/ofp-kill.8.in > ofp-kill.8 diff --git a/utilities/automake.mk b/utilities/automake.mk new file mode 100644 index 00000000..08bf61bb --- /dev/null +++ b/utilities/automake.mk @@ -0,0 +1,60 @@ +bin_PROGRAMS += \ + utilities/vlogconf \ + utilities/dpctl \ + utilities/ofp-discover \ + utilities/ofp-kill +bin_SCRIPTS += utilities/ofp-pki +noinst_SCRIPTS += utilities/ofp-pki-cgi + +EXTRA_DIST += \ + utilities/ofp-discover.8.in \ + utilities/ofp-kill.8.in \ + utilities/ofp-pki-cgi.in \ + utilities/ofp-pki.8.in \ + utilities/ofp-pki.in +DISTCLEANFILES += \ + utilities/ofp-discover.8 \ + utilities/ofp-kill.8 \ + utilities/ofp-pki \ + utilities/ofp-pki-cgi \ + utilities/ofp-pki.8 + +dist_man_MANS += \ + utilities/vlogconf.8 \ + utilities/dpctl.8 +man_MANS += \ + utilities/ofp-pki.8 \ + utilities/ofp-discover.8 \ + utilities/ofp-kill.8 + +utilities_dpctl_SOURCES = utilities/dpctl.c +utilities_dpctl_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) + +utilities_vlogconf_SOURCES = utilities/vlogconf.c +utilities_vlogconf_LDADD = lib/libopenflow.a + +utilities_ofp_discover_SOURCES = utilities/ofp-discover.c +utilities_ofp_discover_LDADD = lib/libopenflow.a + +utilities_ofp_kill_SOURCES = utilities/ofp-kill.c +utilities_ofp_kill_LDADD = lib/libopenflow.a + +pkidir = $(pkgdatadir)/pki + +utilities/ofp-pki: utilities/ofp-pki.in Makefile + $(do_subst) < $(srcdir)/utilities/ofp-pki.in \ + | $(ro_script) > utilities/ofp-pki + chmod +x utilities/ofp-pki +utilities/ofp-pki-cgi: utilities/ofp-pki-cgi.in Makefile + $(do_subst) < $(srcdir)/utilities/ofp-pki-cgi.in \ + | $(ro_script) > utilities/ofp-pki-cgi + chmod +x utilities/ofp-pki-cgi +utilities/ofp-pki.8: utilities/ofp-pki.8.in Makefile + ($(do_subst) && $(ro_man)) \ + < $(srcdir)/utilities/ofp-pki.8.in > utilities/ofp-pki.8 +utilities/ofp-discover.8: utilities/ofp-discover.8.in Makefile + ($(do_subst) && $(ro_man)) < $(srcdir)/utilities/ofp-discover.8.in \ + > utilities/ofp-discover.8 +utilities/ofp-kill.8: utilities/ofp-kill.8.in Makefile + ($(do_subst) && $(ro_man)) < $(srcdir)/utilities/ofp-kill.8.in \ + > utilities/ofp-kill.8