version 1.11, 2000/03/13 06:46:38 |
version 1.15, 2000/09/17 03:12:10 |
|
|
# $OpenXM: OpenXM/src/k097/Makefile,v 1.10 2000/03/11 01:18:24 takayama Exp $ |
# $OpenXM: OpenXM/src/k097/Makefile,v 1.14 2000/05/24 15:24:53 takayama Exp $ |
# targets |
# targets |
# all |
# all |
# compile |
# compile |
# intall : all install-lib |
# intall : all install-lib |
# |
# |
# todo : install-lib-for-debug |
# install-for-debug |
# |
# |
|
OpenXM_HOME=../../../OpenXM |
|
OpenXM_include=$(OpenXM_HOME)/include |
BDATE =19970416 |
BDATE =19970416 |
CC = gcc |
CC = gcc |
GC = $(KHOME)/gc/gc.a |
GC = $(KHOME)/gc/gc.a |
OpenXM_lib=../../lib |
OpenXM_lib=../../lib |
DDD=-D_BSD_SOURCE |
DDD=-D_BSD_SOURCE |
STATIC_LINK_FLAG=-static |
#STATIC_LINK_FLAG=-static |
|
STATIC_LINK_FLAG= |
|
|
## Kan source. kan sources must be built up by hand. |
## Kan source. kan sources must be built up by hand. |
KHOME = ../kan96xx |
KHOME = ../kan96xx |
Line 19 KHOME = ../kan96xx |
|
Line 22 KHOME = ../kan96xx |
|
|
|
## |
## |
LOAD_K_PATH ='"/usr/local/lib/k0/"' |
LOAD_K_PATH ='"/usr/local/lib/k0/"' |
LOAD_SM1_PATH2 ='"/home/nobuki/SSkan/Kan/"' |
LOAD_SM1_PATH2 ='"/this_directory_does_not_exists/"' |
## |
## |
GMP_HOME = $(KHOME)/gmp |
LIBGMP=$(OpenXM_HOME)/lib/libgmp.a |
LIBGMP=$(GMP_HOME)/libgmp.a |
|
## This line is for buggy linux-gmp. |
## This line is for buggy linux-gmp. |
## LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a |
## LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a |
EXTRALIB = |
EXTRALIB = |
|
|
KXX = simple.tab.o d.o ki.o dic.o |
KXX = simple.tab.o d.o ki.o dic.o |
KXXASIR = simple.tab.o d.o ki-asir.o dic.o |
KXXASIR = simple.tab.o d.o ki-asir.o dic.o |
|
|
k0 : k0.o $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(GMP) $(KAN_HOME)/lookup.h |
k0 : k0.o $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(LIBGMP) $(KAN_HOME)/lookup.h |
if test `uname` = "SunOS" ; \ |
if test `uname` = "SunOS" ; \ |
then \ |
then \ |
$(CC) $(FLAG) $(DDD) -I$(GMP_HOME) -I$(KAN_HOME) -o k0 k0.o $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) $(SOLARIS_SLIB) ; \ |
$(CC) $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o k0 k0.o $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) $(SOLARIS_SLIB) ; \ |
else \ |
else \ |
$(CC) ${STATIC_LINK_FLAG} $(FLAG) $(DDD) -I$(GMP_HOME) -I$(KAN_HOME) -o k0 k0.o $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) ; \ |
$(CC) ${STATIC_LINK_FLAG} $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o k0 k0.o $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) ; \ |
fi |
fi |
|
|
k0.o : k2.c |
k0.o : k2.c |
$(CC) -c $(FLAG) $(DDD) -I$(GMP_HOME) -I$(KAN_HOME) -o k0.o k2.c |
$(CC) -c $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o k0.o k2.c |
|
|
ki.o : ki.c |
ki.o : ki.c |
$(CC) -c $(FLAG) $(DDD) -I$(GMP_HOME) -I$(KAN_HOME) -o ki.o ki.c |
$(CC) -c $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o ki.o ki.c |
|
|
ki-asir.o : ki.c |
ki-asir.o : ki.c |
$(CC) -c $(FLAG) $(DDD) -DCALLASIR -I$(GMP_HOME) -I$(KAN_HOME) -o ki-asir.o ki.c |
$(CC) -c $(FLAG) $(DDD) -DCALLASIR -I$(OpenXM_include) -I$(KAN_HOME) -o ki-asir.o ki.c |
|
|
dic.o : dic.c d.h |
dic.o : dic.c d.h |
$(CC) -c $(FLAG) $(DDD) -o dic.o dic.c |
$(CC) -c $(FLAG) $(DDD) -o dic.o dic.c |
|
|
ASIRKAN = $(ASIRKAN_HOME)/ak.a |
ASIRKAN = $(ASIRKAN_HOME)/ak.a |
K2INCLUDE = -I$(ASIR_INCLUDE) -I$(ASIR_INCLUDE2) -I$(KHOME)/Kan -I$(ASIRKAN_HOME) $(SOLARIS_EXTRA_INCLUDE) |
K2INCLUDE = -I$(ASIR_INCLUDE) -I$(ASIR_INCLUDE2) -I$(KHOME)/Kan -I$(ASIRKAN_HOME) $(SOLARIS_EXTRA_INCLUDE) |
|
|
k2 : k2.c $(KAN_HOME)/kanlib.a $(KXXASIR) msg1.o $(ASIRKAN) $(ASIRKAN_HOME)/$(CALL_ASIR) $(ASIRGC) $(GMP) |
k2 : k2.c $(KAN_HOME)/kanlib.a $(KXXASIR) msg1.o $(ASIRKAN) $(ASIRKAN_HOME)/$(CALL_ASIR) $(ASIRGC) |
$(CC) $(FLAG) $(DDD) -DCALLASIR $(K2INCLUDE) -o k2 k2.c $(KXXASIR) msg1.o $(ASIRKAN_HOME)/$(CALL_ASIR) -L/usr/X11R6/lib -L$(ALIB) $(LFLAG) $(KAN_HOME)/kanlib.a $(ASIRKAN) $(GMP) $(ASIRGC) |
$(CC) $(FLAG) $(DDD) -DCALLASIR $(K2INCLUDE) -o k2 k2.c $(KXXASIR) msg1.o $(ASIRKAN_HOME)/$(CALL_ASIR) -L/usr/X11R6/lib -L$(ALIB) $(LFLAG) $(KAN_HOME)/kanlib.a $(ASIRKAN) $(ASIRGC) |
|
|
msg1.o : msg1.c |
msg1.o : msg1.c |
$(CC) $(FLAG) $(DDD) -DCALLASIR $(K2INCLUDE) -c msg1.c |
$(CC) $(FLAG) $(DDD) -DCALLASIR $(K2INCLUDE) -c msg1.c |
|
|
(cd $(ASIRKAN_HOME); make ak.a) |
(cd $(ASIRKAN_HOME); make ak.a) |
|
|
|
|
$(GMP) : |
|
(cd $(KHOME)/gmp ; ./configure; make ) |
|
$(GC) : |
$(GC) : |
(cd $(KHOME)/gc ; make ) |
(cd $(KHOME)/gc ; make ) |
|
|
|
|
########## |
########## |
## A sample to compilation: source is test0.c, output is test0 |
## A sample to compilation: source is test0.c, output is test0 |
test0 : test0.c $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(GMP) $(KAN_HOME)/lookup.h |
test0 : test0.c $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(KAN_HOME)/lookup.h |
$(CC) $(FLAG) $(DDD) -I$(GMP_HOME) -I$(KAN_HOME) -o test0 test0.c $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) |
$(CC) $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o test0 test0.c $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) |
|
|
|
|
|
|
|
|
install : all install-lib |
install : all install-lib |
cp -f k0 d0 ../../bin |
cp -f k0 d0 ../../bin |
|
|
|
install-for-debug : all install-lib-for-debug |
|
rm -f ../../bin/k0 ../../bin/d0 |
|
(cd ../../bin ; ln -s ../src/k097/k0 k0) |
|
(cd ../../bin ; ln -s ../src/k097/d0 d0) |
|
|
install-lib : |
install-lib : |
/bin/rm -rf $(OpenXM_lib)/k097 |
/bin/rm -rf $(OpenXM_lib)/k097 |
mkdir $(OpenXM_lib)/k097 |
mkdir $(OpenXM_lib)/k097 |
cp -f $(KHOME)/Doc/var.sm1 $(OpenXM_lib)/k097 |
cp -f $(KHOME)/Doc/var.sm1 $(OpenXM_lib)/k097 |
cp -rf *.sm1 *.k *.kk debug $(OpenXM_lib)/k097 |
cp -rf *.sm1 *.k *.kk debug $(OpenXM_lib)/k097 |
|
|
install-for-debug : |
install-lib-for-debug : |
/bin/rm -rf $(OpenXM_lib)/k097 |
/bin/rm -rf $(OpenXM_lib)/k097 |
ln -s ../src/k097 $(OpenXM_lib)/k097 |
ln -s ../src/k097 $(OpenXM_lib)/k097 |
|
|