version 1.10, 2000/01/10 19:11:59 |
version 1.31, 2003/09/08 01:22:56 |
|
|
## $OpenXM: OpenXM/src/kan96xx/Makefile,v 1.9 1999/11/27 13:24:40 takayama Exp $ |
# $OpenXM: OpenXM/src/kan96xx/Makefile,v 1.30 2003/09/02 03:31:12 takayama Exp $ |
|
# |
|
# Building kan96xx depends on |
|
# install-gmp, install-gc [install-asir-gc] |
|
# |
|
OpenXM_HOME=../.. |
|
OpenXM_contrib=${OpenXM_HOME}/../OpenXM_contrib |
|
OpenXM_bin=${OpenXM_HOME}/bin |
|
OpenXM_lib=${OpenXM_HOME}/lib |
|
|
## Type in make configure and make all to build all |
RM=rm |
OpenXM_contrib=../../../OpenXM_contrib |
|
OPENXM_CONTRIB=../../../OpenXM_contrib |
|
GC=$(OPENXM_CONTRIB)/gc |
|
GMP=$(OPENXM_CONTRIB)/gmp |
|
|
|
all : all-gc all-gmp |
all : all-sm1 all-kanlib.a |
(cd plugin; make all) |
|
(cd Kan; make all) |
|
|
|
all2 : all-gc all-gmp |
all-sm1 : all-plugin |
(cd Kan; make all) |
(cd Kan; make all) |
|
all-plugin : configure |
|
(cd plugin ; make all) |
|
all-kanlib.a : all-plugin |
|
(cd Kan ; make kanlib.a) |
|
|
all-gc: |
|
(cd $(GC) ; make all) |
|
|
|
all-gmp: |
|
if test -f /usr/lib/libgmp.a ; \ |
|
then \ |
|
echo "Using /usr/lib/libgmp.a" ; \ |
|
/bin/rm -rf $(GMP)/libgmp.a ; \ |
|
ln -s /usr/lib/libgmp.a $(GMP)/libgmp.a ; \ |
|
else \ |
|
(cd $(GMP) ; make) ; \ |
|
fi |
|
|
|
|
|
|
|
### When you make sm1 without the garbage collector, type in make sm1.nogc |
### When you make sm1 without the garbage collector, type in make sm1.nogc |
sm1.nogc : |
sm1-nogc : all-plugin |
(cd Kan; make sm1.nogc) |
(cd Kan; make sm1.nogc) |
|
########################################################## |
configure : configure_symbolic_links |
configure: configure_symbolic_links |
(cd $(GMP) ; ./configure ) |
if test ! -f ./.configure_done ; \ |
|
then \ |
|
(cd Kan; sh ./configure) ; \ |
|
(cd plugin; sh ./configure) ; \ |
|
fi |
|
@touch ./.configure_done |
configure_symbolic_links : |
configure_symbolic_links : |
/bin/rm -f gc gmp lib Doc/var.sm1 |
@if test ! -f ./.configure_symbolic_links_done ; \ |
ln -f -s $(OpenXM_contrib)/gc gc |
then \ |
ln -f -s $(OpenXM_contrib)/gmp gmp |
${RM} -f lib Doc/var.sm1 ; \ |
# ln -f -s gmp-2.0.2-ssh-2 gmp |
ln -f -s ./Doc lib ; \ |
ln -f -s ./Doc lib |
(cd Doc; ln -f -s ../Kan/var.sm1 var.sm1) ; \ |
(cd Doc; ln -f -s ../Kan/var.sm1 var.sm1) |
fi |
|
@touch ./.configure_symbolic_links_done |
### generate a distribution. |
|
dist : |
|
./makeDist |
|
############### |
############### |
install : |
install: install-exec install-man install-document |
mkdir /usr/local/lib/sm1 |
install-exec: clean-for-install all-sm1 |
cp lib/* /usr/local/lib/sm1 |
install Kan/sm1 ${OpenXM_bin} |
cp Kan/sm1 /usr/local/bin |
install-man : |
|
-cp Doc/sm1.1 ${OpenXM_HOME}/man/man1 |
|
install-document: |
|
-(cd Doc ; make install-document) |
|
install-for-debug : clean-for-install |
|
if [ "`uname | sed -e 's/_.*$$//'`" = "CYGWIN" ]; then \ |
|
ln -f -s ../src/kan96xx/Kan/sm1.exe ${OpenXM_bin}/sm1.exe ; \ |
|
else \ |
|
ln -f -s ../src/kan96xx/Kan/sm1 ${OpenXM_bin}/sm1 ; \ |
|
fi |
|
|
############### |
|
install-binary : |
|
/bin/rm -f sm1 |
|
echo ":" > sm1 |
|
echo "LOAD_SM1_PATH=`pwd`/lib/" >>sm1 |
|
echo "export LOAD_SM1_PATH" >>sm1 |
|
echo -n "`pwd`/`ls Kan/sm1.*` " >>sm1 |
|
echo -n '$$' >>sm1 |
|
echo '*' >>sm1 |
|
chmod +x sm1 |
|
ln -s sm1 Kan/sm1 |
|
install-binary-solaris : |
|
/bin/rm -f sm1 |
|
/usr/ucb/echo ":" > sm1 |
|
/usr/ucb/echo "LOAD_SM1_PATH=`pwd`/lib/" >>sm1 |
|
/usr/ucb/echo "export LOAD_SM1_PATH" >>sm1 |
|
/usr/ucb/echo -n "`pwd`/`ls Kan/sm1.*` " >>sm1 |
|
/usr/ucb/echo -n '$$' >>sm1 |
|
/usr/ucb/echo '*' >>sm1 |
|
chmod +x sm1 |
|
ln -s sm1 Kan/sm1 |
|
clean-binary : |
|
echo " ../kanbinary* will be removed" |
|
echo "after 10 seconds. To cancel type in ctrl-C." |
|
( sleep 10 ; /bin/rm -rf ../kanbinary* ) |
|
install-openXM-bin : |
|
/bin/rm -f ../bin/sm1 |
|
cp Kan/sm1 ../bin |
|
install2 : |
|
/bin/rm -f ../bin/sm1 |
|
ln -f -s ../src/kan96xx/Kan/sm1 ../bin/sm1 |
|
|
|
############## |
############## |
clean : |
clean-for-install : |
if test -f $(GMP)/Makefile ; \ |
${RM} -f ${OpenXM_bin}/sm1 |
then \ |
clean-done: |
(cd $(GMP) ; make clean) ; \ |
${RM} -f ./.*done |
fi |
clean : clean-done |
if test -f $(GC)/Makefile ; \ |
${RM} -f ./.*done |
then \ |
|
(cd $(GC); make clean) ; \ |
|
fi |
|
(cd Kan; make clean) |
(cd Kan; make clean) |
(cd plugin; make clean) |
(cd plugin; make clean) |
/bin/rm -f sm1 |
(cd Doc; make clean) |
|
${RM} -f sm1 gmp gc Doc/var.sm1 lib |
|
|
|
|
### clean also *.a files. |
|
cleana: distclean |
|
|
|
distclean : |
|
if test -f $(GMP)/Makefile ; \ |
|
then \ |
|
(cd $(GMP) ; make distclean) ; \ |
|
fi |
|
if test -f $(GC)/Makefile ; \ |
|
then \ |
|
(cd $(GC); make clean; /bin/rm -f *.a) ; \ |
|
fi |
|
(cd Kan; make cleana) |
|
(cd plugin; make clean; /bin/rm -f *.a) |
|