2011-01-28 06:57:00 -06:00
|
|
|
|
2011-10-19 14:45:57 -05:00
|
|
|
# -*- Makefile -*-
|
2011-01-28 06:57:00 -06:00
|
|
|
# Mimicking the behavior of a top-level autotool generated Makefile.
|
|
|
|
|
2015-04-08 10:45:45 -05:00
|
|
|
pythonSiteLocator = "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1)"
|
2011-01-28 06:57:00 -06:00
|
|
|
|
2015-04-08 10:45:45 -05:00
|
|
|
tools = bootstrap vlsisapd hurricane crlcore coloquinte etesian knik \
|
|
|
|
katabatic kite equinox solstice cumulus stratus1 unicorn documentation
|
|
|
|
prefix = /usr
|
|
|
|
rootPrefix = $(subst /usr,,$(prefix))
|
|
|
|
DESTDIR =
|
|
|
|
BUILD_DESTDIR = $(shell pwd)/install.dir
|
|
|
|
PYTHON_SITEDIR = $(shell python -c $(pythonSiteLocator))
|
|
|
|
IMPORTEDS_TOP = $(prefix)
|
|
|
|
CORIOLIS_TOP = $(prefix)
|
2015-04-07 17:33:26 -05:00
|
|
|
|
2015-04-08 10:45:45 -05:00
|
|
|
environment = IMPORTEDS_TOP=$(IMPORTEDS_TOP); export IMPORTEDS_TOP; \
|
|
|
|
CORIOLIS_TOP=$(CORIOLIS_TOP); export CORIOLIS_TOP
|
2011-02-02 04:40:25 -06:00
|
|
|
|
|
|
|
.PHONY: build install FORCE
|
2011-01-28 06:57:00 -06:00
|
|
|
|
2015-04-08 10:45:45 -05:00
|
|
|
|
2011-01-28 06:57:00 -06:00
|
|
|
all: build
|
|
|
|
|
2011-02-02 04:40:25 -06:00
|
|
|
clean:
|
|
|
|
rm -rf build.dir install.dir \
|
|
|
|
crlcore/doc/doxygen/html \
|
|
|
|
hurricane/doc/hurricane/html \
|
|
|
|
hurricane/doc/hurricane/latex \
|
|
|
|
hurricane/doc/viewer/html \
|
|
|
|
hurricane/doc/viewer/latex
|
|
|
|
|
|
|
|
build: FORCE
|
2011-01-28 06:57:00 -06:00
|
|
|
$(environment); \
|
2011-02-02 04:40:25 -06:00
|
|
|
case "`uname -m`" in \
|
|
|
|
"x86_64") cmakeArgs="-D LIB_SUFFIX:STRING=64";; \
|
|
|
|
*) cmakeArgs="";; \
|
|
|
|
esac; \
|
2015-04-08 10:45:45 -05:00
|
|
|
case "$${X_SCLS}" in \
|
|
|
|
*"devtoolset"*) \
|
|
|
|
cmakeArgs="$${cmakeArgs} -D Boost_NO_SYSTEM_PATHS:STRING=TRUE"; \
|
|
|
|
BOOST_INCLUDEDIR="/opt/rh/devtoolset-2/root/usr/include"; \
|
|
|
|
BOOST_LIBRARYDIR="/opt/rh/devtoolset-2/root/usr/lib"; \
|
|
|
|
export BOOST_INCLUDEDIR BOOST_LIBRARYDIR; \
|
|
|
|
echo "** Using $${X_SCLS}."; \
|
|
|
|
;; \
|
|
|
|
esac; \
|
2011-02-02 04:40:25 -06:00
|
|
|
for tool in $(tools); do \
|
2011-02-02 06:58:46 -06:00
|
|
|
echo "** Building tool $${tool}"; \
|
2011-02-02 04:40:25 -06:00
|
|
|
mkdir -p build.dir/$$tool; \
|
|
|
|
cd build.dir/$$tool; \
|
|
|
|
cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
|
|
|
|
-D BUILD_SHARED_LIBS:STRING=ON \
|
|
|
|
-D BUILD_DOC:STRING=OFF \
|
|
|
|
-D CMAKE_INSTALL_PREFIX:STRING=$(CORIOLIS_TOP) \
|
|
|
|
-D DESTDIR:STRING=$(BUILD_DESTDIR) \
|
|
|
|
$${cmakeArgs} \
|
2015-04-07 17:33:26 -05:00
|
|
|
../../coriolis/$$tool \
|
2011-02-02 04:40:25 -06:00
|
|
|
|| exit 1; \
|
2015-04-08 10:45:45 -05:00
|
|
|
make DESTDIR=$(BUILD_DESTDIR) $(SMP_MFLAGS) install \
|
2011-02-02 04:40:25 -06:00
|
|
|
|| exit 1; \
|
|
|
|
cd ../..; \
|
2011-01-28 06:57:00 -06:00
|
|
|
done
|
|
|
|
|
2011-02-02 04:40:25 -06:00
|
|
|
install: FORCE
|
2011-01-28 06:57:00 -06:00
|
|
|
$(environment); \
|
2011-02-02 04:40:25 -06:00
|
|
|
case "`uname -m`" in \
|
|
|
|
"x86_64") commonCMakeArgs="-D LIB_SUFFIX:STRING=64";; \
|
|
|
|
*) commonCMakeArgs="";; \
|
|
|
|
esac; \
|
|
|
|
for tool in $(tools); do \
|
2011-02-02 06:58:46 -06:00
|
|
|
echo "** Installing tool $${tool}"; \
|
2011-02-02 04:40:25 -06:00
|
|
|
cd build.dir/$$tool; \
|
|
|
|
makeArgs=""; \
|
|
|
|
cmakeArgs="$$commonCMakeArgs -D BUILD_DOC:STRING=OFF"; \
|
2012-12-03 09:10:56 -06:00
|
|
|
if [ "$$tool" = "stratus1" ]; then \
|
2011-02-02 04:40:25 -06:00
|
|
|
makeArgs="dvi safepdf html"; \
|
|
|
|
cmakeArgs="$$commonCMakeArgs -D BUILD_DOC:STRING=ON"; \
|
|
|
|
fi; \
|
2012-12-04 06:29:00 -06:00
|
|
|
if [ "$$tool" = "hurricane" \
|
|
|
|
-o "$$tool" = "crlcore" \
|
|
|
|
-o "$$tool" = "unicorn" ]; then \
|
2011-02-02 04:40:25 -06:00
|
|
|
cmakeArgs="$$commonCMakeArgs -D BUILD_DOC:STRING=ON"; \
|
|
|
|
fi; \
|
|
|
|
cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
|
|
|
|
-D BUILD_SHARED_LIBS:STRING=ON \
|
|
|
|
-D CMAKE_INSTALL_PREFIX:STRING=${CORIOLIS_TOP} \
|
|
|
|
-D DESTDIR:STRING=$(DESTDIR) \
|
|
|
|
$${cmakeArgs} \
|
2015-04-07 17:33:26 -05:00
|
|
|
../../coriolis/$$tool \
|
2011-02-02 04:40:25 -06:00
|
|
|
|| exit 1; \
|
|
|
|
make DESTDIR=$(DESTDIR) -j1 $${makeArgs} install \
|
|
|
|
|| exit 1; \
|
|
|
|
cd ../..; \
|
|
|
|
done; \
|
2015-04-08 10:45:45 -05:00
|
|
|
rm -rfv $(DESTDIR)$(rootPrefix)/etc/coriolis2/coriolis2.sh \
|
|
|
|
$(DESTDIR)$(prefix)/bin/ccb \
|
|
|
|
$(DESTDIR)$(prefix)/bin/cx2y \
|
|
|
|
$(DESTDIR)$(prefix)/bin/*.bin \
|
|
|
|
$(DESTDIR)$(rootPrefix)$(PYTHON_SITEDIR)/builder \
|
|
|
|
$(DESTDIR)$(prefix)/share/cmake/Modules/GetGitRevisionDescription.cmake.in
|
2011-02-02 04:40:25 -06:00
|
|
|
|
|
|
|
FORCE:
|