2013-08-29 15:21:13 +01:00
|
|
|
# CORE
|
|
|
|
# (c)2012 the Boeing Company.
|
|
|
|
# See the LICENSE file included in this directory.
|
|
|
|
#
|
|
|
|
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
|
|
|
|
#
|
|
|
|
# Makefile for building corens3 components.
|
|
|
|
#
|
|
|
|
|
2015-05-26 18:33:57 +01:00
|
|
|
SETUPPY = setup.py
|
|
|
|
SETUPPYFLAGS = -v
|
|
|
|
|
|
|
|
EXAMPLE_FILES = \
|
|
|
|
examples/ns3lte.py \
|
|
|
|
examples/ns3wifi.py \
|
|
|
|
examples/ns3wifirandomwalk.py \
|
|
|
|
examples/ns3wimax.py
|
|
|
|
|
2015-05-26 18:34:28 +01:00
|
|
|
coreexampledir = $(datadir)/core/examples/corens3
|
2015-05-27 14:29:09 +01:00
|
|
|
dist_coreexample_SCRIPTS= $(EXAMPLE_FILES)
|
2015-05-26 18:33:57 +01:00
|
|
|
|
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:
|
2017-08-21 20:55:51 +01:00
|
|
|
$(MKDIR_P) ${DESTDIR}/${pythondir}
|
|
|
|
$(MKDIR_P) ${DESTDIR}/${pyexecdir}
|
|
|
|
PYTHONPATH=${DESTDIR}/${pythondir} $(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
|
|
|
|
|
|
|
# Python package uninstall
|
|
|
|
uninstall-hook:
|
|
|
|
rm -f ${pythondir}/corens3_python-${COREDPY_VERSION}-py${PYTHON_VERSION}.egg-info
|
|
|
|
rm -rf ${pythondir}/corens3
|
2015-05-26 18:33:57 +01:00
|
|
|
rmdir -p $(coreexampledir) || 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 *.pyc corens3/*.pyc MANIFEST
|
|
|
|
|
|
|
|
# files to include with distribution tarball
|
2015-05-26 18:33:57 +01:00
|
|
|
EXTRA_DIST = LICENSE $(SETUPPY) corens3
|