2013-08-29 15:21:13 +01:00
|
|
|
# CORE
|
|
|
|
# (c)2010-2012 the Boeing Company.
|
|
|
|
# See the LICENSE file included in this distribution.
|
|
|
|
#
|
|
|
|
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
|
|
|
|
#
|
|
|
|
# Makefile for building netns components.
|
|
|
|
#
|
|
|
|
|
2015-05-26 18:33:57 +01:00
|
|
|
SETUPPY = setup.py
|
|
|
|
SETUPPYFLAGS = -v
|
2015-05-16 02:53:20 +01:00
|
|
|
|
2013-08-29 15:21:13 +01:00
|
|
|
if WANT_NETNS
|
|
|
|
SUBDIRS = src ns3
|
|
|
|
endif
|
|
|
|
|
2015-05-26 18:33:57 +01:00
|
|
|
SBIN_FILES = \
|
|
|
|
sbin/core-cleanup \
|
|
|
|
sbin/core-daemon \
|
|
|
|
sbin/core-manage \
|
|
|
|
sbin/core-xen-cleanup \
|
|
|
|
sbin/coresendmsg
|
|
|
|
|
|
|
|
dist_sbin_SCRIPTS = $(SBIN_FILES)
|
|
|
|
|
|
|
|
CONF_FILES = \
|
|
|
|
data/core.conf \
|
|
|
|
data/xen.conf
|
|
|
|
|
|
|
|
coreconfdir = $(CORE_CONF_DIR)
|
|
|
|
dist_coreconf_DATA = $(CONF_FILES)
|
|
|
|
|
|
|
|
EXAMPLE_FILES = \
|
|
|
|
examples/controlnet_updown \
|
2015-09-23 21:45:47 +01:00
|
|
|
examples/emanemanifest2core.py \
|
2015-05-26 18:33:57 +01:00
|
|
|
examples/emanemodel2core.py \
|
|
|
|
examples/findcore.py \
|
|
|
|
examples/stopsession.py
|
|
|
|
|
|
|
|
coreexdir = $(datadir)/core/examples
|
2015-05-27 14:29:09 +01:00
|
|
|
dist_coreex_SCRIPTS = $(EXAMPLE_FILES)
|
2015-05-26 18:33:57 +01:00
|
|
|
|
|
|
|
EXAMPLE_MYSERVICES_FILES = \
|
|
|
|
examples/myservices/README.txt \
|
|
|
|
examples/myservices/__init__.py \
|
|
|
|
examples/myservices/sample.py
|
|
|
|
|
|
|
|
coreexmyservicesdir = $(coreexdir)/myservices
|
|
|
|
dist_coreexmyservices_DATA = $(EXAMPLE_MYSERVICES_FILES)
|
|
|
|
|
|
|
|
EXAMPLE_NETNS_FILES = \
|
|
|
|
examples/netns/basicrange.py \
|
2015-12-28 19:56:00 +00:00
|
|
|
examples/netns/daemonnodes.py \
|
2015-05-26 18:33:57 +01:00
|
|
|
examples/netns/distributed.py \
|
|
|
|
examples/netns/emane80211.py \
|
|
|
|
examples/netns/howmanynodes.py \
|
|
|
|
examples/netns/iperf-performance-chain.py \
|
|
|
|
examples/netns/iperf-performance.sh \
|
|
|
|
examples/netns/ospfmanetmdrtest.py \
|
|
|
|
examples/netns/switch.py \
|
|
|
|
examples/netns/switchtest.py \
|
|
|
|
examples/netns/twonodes.sh \
|
|
|
|
examples/netns/wlanemanetests.py \
|
|
|
|
examples/netns/wlantest.py
|
|
|
|
|
|
|
|
coreexnetnsdir = $(coreexdir)/netns
|
2015-05-27 14:29:09 +01:00
|
|
|
dist_coreexnetns_SCRIPTS= $(EXAMPLE_NETNS_FILES)
|
2015-05-26 18:33:57 +01:00
|
|
|
|
|
|
|
EXAMPLE_SERVICES_FILES = \
|
|
|
|
examples/services/sampleFirewall \
|
|
|
|
examples/services/sampleIPsec \
|
|
|
|
examples/services/sampleVPNClient \
|
|
|
|
examples/services/sampleVPNServer
|
|
|
|
|
|
|
|
coreexservicesdir = $(coreexdir)/services
|
|
|
|
dist_coreexservices_DATA= $(EXAMPLE_SERVICES_FILES)
|
|
|
|
|
2015-12-29 18:50:28 +00:00
|
|
|
LOGROTATE_DIR = $(sysconfdir)/logrotate.d
|
|
|
|
LOGROTATE_FILE = data/core-daemon.logrotate
|
|
|
|
|
2013-08-29 15:21:13 +01:00
|
|
|
# Python package build
|
|
|
|
noinst_SCRIPTS = build
|
|
|
|
build:
|
2015-05-26 18:33:57 +01:00
|
|
|
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) build
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# Python package install
|
|
|
|
install-exec-hook:
|
2015-05-26 18:33:57 +01:00
|
|
|
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) install --prefix=${DESTDIR}/${pyprefix} --install-purelib=${DESTDIR}/${pythondir} --install-platlib=${DESTDIR}/${pyexecdir} --no-compile
|
2013-08-29 15:21:13 +01:00
|
|
|
|
2015-12-29 18:50:28 +00:00
|
|
|
install-data-local:
|
|
|
|
$(MKDIR_P) $(DESTDIR)$(LOGROTATE_DIR)
|
|
|
|
$(INSTALL_DATA) $(LOGROTATE_FILE) \
|
|
|
|
$(DESTDIR)$(LOGROTATE_DIR)/`basename $(LOGROTATE_FILE) .logrotate`
|
|
|
|
|
|
|
|
uninstall-local:
|
|
|
|
rm -f $(DESTDIR)$(LOGROTATE_DIR)/`basename $(LOGROTATE_FILE) .logrotate`
|
|
|
|
|
2013-08-29 15:21:13 +01:00
|
|
|
# Python package uninstall
|
|
|
|
uninstall-hook:
|
|
|
|
rm -f ${pythondir}/core_python-${COREDPY_VERSION}-py${PYTHON_VERSION}.egg-info
|
|
|
|
rm -f ${pythondir}/core_python_netns-1.0-py${PYTHON_VERSION}.egg-info
|
|
|
|
rm -rf ${pythondir}/core
|
2015-05-26 18:33:57 +01:00
|
|
|
rmdir -p $(coreexservicesdir) || true
|
|
|
|
rmdir -p $(coreexnetnsdir) || true
|
|
|
|
rmdir -p $(coreexmyservicesdir) || true
|
|
|
|
rmdir -p $(coreexdir) || true
|
|
|
|
rmdir -p $(coreconfdir) || true
|
2015-12-29 18:50:28 +00:00
|
|
|
rmdir -p $(LOGROTATE_DIR) || true
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# Python package cleanup
|
|
|
|
clean-local:
|
|
|
|
-rm -rf build
|
|
|
|
|
|
|
|
# Python RPM package
|
|
|
|
rpm:
|
2015-05-26 18:33:57 +01:00
|
|
|
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) bdist_rpm
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# because we include entire directories with EXTRA_DIST, we need to clean up
|
|
|
|
# the source control files
|
|
|
|
dist-hook:
|
|
|
|
rm -rf `find $(distdir)/ -name .svn` `find $(distdir)/ -name '*.pyc'`
|
|
|
|
|
|
|
|
DISTCLEANFILES = Makefile.in core/*.pyc MANIFEST doc/Makefile.in doc/Makefile \
|
|
|
|
doc/conf.py core/addons/*.pyc
|
|
|
|
|
|
|
|
# files to include with distribution tarball
|
2015-12-29 18:50:28 +00:00
|
|
|
EXTRA_DIST = $(SETUPPY) MANIFEST.in CORE.e4p core doc $(LOGROTATE_FILE)
|