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.
|
|
|
|
#
|
|
|
|
|
2018-10-10 20:26:21 +01:00
|
|
|
if WANT_PYTHON
|
|
|
|
|
2019-06-10 19:41:27 +01:00
|
|
|
if PYTHON3
|
|
|
|
PYTHONLIBDIR=$(libdir)/python3/dist-packages
|
|
|
|
else
|
|
|
|
PYTHONLIBDIR=$(pythondir)
|
|
|
|
endif
|
|
|
|
|
2018-03-13 23:20:50 +00:00
|
|
|
SETUPPY = setup.py
|
|
|
|
SETUPPYFLAGS = -v
|
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:
|
2018-03-13 23:20:50 +00:00
|
|
|
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) install \
|
|
|
|
--root=/$(DESTDIR) \
|
|
|
|
--prefix=$(prefix) \
|
2019-06-10 19:41:27 +01:00
|
|
|
--install-lib=$(PYTHONLIBDIR) \
|
2018-03-13 23:20:50 +00:00
|
|
|
--single-version-externally-managed \
|
2017-08-21 20:55:51 +01:00
|
|
|
--no-compile
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# Python package uninstall
|
|
|
|
uninstall-hook:
|
2018-03-14 17:43:25 +00:00
|
|
|
-rm -rf core_ns3.egg-info
|
2019-06-10 19:41:27 +01:00
|
|
|
-rm -rf $(DESTDIR)/$(PYTHONLIBDIR)/core_ns3-$(PACKAGE_VERSION)-py$(PYTHON_VERSION).egg-info
|
|
|
|
-rm -rf $(DESTDIR)/$(PYTHONLIBDIR)/corens3
|
2018-03-14 17:43:25 +00:00
|
|
|
-rm -rf $(DESTDIR)/$(datadir)/corens3
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# Python package cleanup
|
|
|
|
clean-local:
|
|
|
|
-rm -rf build
|
|
|
|
|
|
|
|
# because we include entire directories with EXTRA_DIST, we need to clean up
|
|
|
|
# the source control files
|
|
|
|
dist-hook:
|
2018-03-14 17:43:25 +00:00
|
|
|
-rm -rf `find $(distdir)/ -name '*.pyc'`
|
|
|
|
|
|
|
|
distclean-local:
|
|
|
|
-rm -rf core_ns3.egg-info
|
2013-08-29 15:21:13 +01:00
|
|
|
|
2018-03-14 17:43:25 +00:00
|
|
|
DISTCLEANFILES = Makefile.in
|
2013-08-29 15:21:13 +01:00
|
|
|
|
|
|
|
# files to include with distribution tarball
|
2018-03-14 17:43:25 +00:00
|
|
|
EXTRA_DIST = LICENSE $(SETUPPY) corens3 examples
|
2018-10-10 20:26:21 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
# endif WANT_PYTHON
|