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.
|
|
|
|
|
2011-02-02 04:40:25 -06:00
|
|
|
tools = bootstrap vlsisapd hurricane crlcore nimbus metis mauka knik katabatic kite \
|
|
|
|
equinox solstice cumulus stratus1 unicorn
|
|
|
|
prefix = /usr
|
2011-01-28 06:57:00 -06:00
|
|
|
DESTDIR =
|
2011-02-02 04:40:25 -06:00
|
|
|
BUILD_DESTDIR = $(shell pwd)/install.dir
|
|
|
|
BOOTSTRAP_TOP = $(prefix)
|
2011-01-28 06:57:00 -06:00
|
|
|
VLSISAPD_TOP = $(prefix)
|
|
|
|
CORIOLIS_TOP = $(prefix)
|
|
|
|
|
2011-02-02 04:40:25 -06:00
|
|
|
environment = BOOTSTRAP_TOP=$(BOOTSTRAP_TOP); export BOOTSTRAP_TOP; \
|
|
|
|
VLSISAPD_TOP=$(VLSISAPD_TOP); export VLSISAPD_TOP; \
|
|
|
|
CORIOLIS_TOP=$(CORIOLIS_TOP); export CORIOLIS_TOP
|
|
|
|
|
|
|
|
.PHONY: build install FORCE
|
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; \
|
|
|
|
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} \
|
|
|
|
../../$$tool \
|
|
|
|
|| exit 1; \
|
|
|
|
make DESTDIR=$(BUILD_DESTDIR) install \
|
|
|
|
|| 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"; \
|
|
|
|
if [ "$$tool" = "crlcore" \
|
|
|
|
-o "$$tool" = "stratus1" ]; then \
|
|
|
|
makeArgs="dvi safepdf html"; \
|
|
|
|
cmakeArgs="$$commonCMakeArgs -D BUILD_DOC:STRING=ON"; \
|
|
|
|
fi; \
|
|
|
|
if [ "$$tool" = "hurricane" ]; then \
|
|
|
|
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} \
|
|
|
|
../../$$tool \
|
|
|
|
|| exit 1; \
|
|
|
|
make DESTDIR=$(DESTDIR) -j1 $${makeArgs} install \
|
|
|
|
|| exit 1; \
|
|
|
|
cd ../..; \
|
|
|
|
done; \
|
|
|
|
rm -f $(DESTDIR)$(CORIOLIS_TOP)/bin/cx2y \
|
|
|
|
$(DESTDIR)$(CORIOLIS_TOP)/bin/kite-text
|
|
|
|
|
|
|
|
FORCE:
|