version 1.3, 2002/02/09 06:21:02 |
version 1.14, 2003/11/24 08:16:13 |
|
|
### $OpenXM: OpenXM/src/kan96xx/Kan/Makefile.in,v 1.2 2002/02/04 07:58:28 takayama Exp $ |
### $OpenXM: OpenXM/src/kan96xx/Kan/Makefile.in,v 1.13 2003/11/24 02:33:39 takayama Exp $ |
all : sm1 |
# |
|
# depends on install-gmp, install-gc [install-asir-gc] |
|
# ( cd ../plugin ; make ) |
|
# |
|
all : configure sm1 |
# .SUFFIXES: |
# .SUFFIXES: |
########################## configuration ############################## |
########################## configuration ############################## |
TOPDIR=../../../../OpenXM |
OpenXM_HOME=../../.. |
OpenXM_HOME=${TOPDIR} |
OpenXM_include=${OpenXM_HOME}/include |
OpenXM_include=$(OpenXM_HOME)/include |
OpenXM_lib=${OpenXM_HOME}/lib |
#### What C compiler do you use? |
|
CC = gcc |
CC=@CC@ |
#### Gargabe collector? If GC = nogc.c, then you need to define -DNOGC. |
RANLIB=@RANLIB@ |
GC = $(OpenXM_HOME)/lib/libgc.a |
LIBS=@LIBS@ |
|
LIBS2 = -L${OpenXM_lib} -lgmp -lgc -lox_pathfinder |
#GC = nogc.c |
#GC = nogc.c |
#### -D options |
|
DDD = -D_BSD_SOURCE |
|
#DDD = -DNOGC -D_BSD_SOURCE |
|
#STATIC_LINK_FLAG = -static |
#STATIC_LINK_FLAG = -static |
STATIC_LINK_FLAG = |
STATIC_LINK_FLAG = |
|
|
#### Optimization level etc. |
#### Optimization level etc. |
#CFLAGS = |
#### option for gdb CFLAGS = -g, optimize -O, profile -p, -DNOGC |
#### option for gdb CFLAGS = -g |
CFLAGS = @CFLAGS@ -D_BSD_SOURCE |
CFLAGS = -O |
|
#### optimizer which seems not to be reliable at level 2,3 and 4. |
|
#CFLAGS = -O |
|
#### profiler to output mon.out |
|
#CFLAGS = -O |
|
|
|
GMP_HOME2 = ../../gmp |
|
LIBGMP = @@@LIBGMP@@@ |
|
## This line is for buggy linux-gmp. |
|
##LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a |
|
|
|
## Library you need on Solaris 2.* |
|
SOLARISLIB = -lnsl -lsocket /usr/ucblib/libucb.a |
|
|
|
################### Plugin modules |
################### Plugin modules |
## Note that you need to make PLUGIN_LIB by your hand. |
|
## Example: |
|
## (1) |
|
##PLUGIN = ../plugin |
|
##PLUGIN_PROTOTYPE = $(PLUGIN)/sample.h $(PLUGIN)/graphic0.h |
|
##PLUGIN_LIB = $(PLUGIN)/sample.a $(PLUGIN)/graphic0.a |
|
##PLUGIN_EXT = $(PLUGIN)/sample.hh $(PLUGIN)/graphic0.hh |
|
##PLUGIN_SM1 =$(PLUGIN)/sample.sm1 $(PLUGIN)/graphic0.sm1 |
|
##PLUGIN_LINKFLAG = -lx11 |
|
###### end of example. If you do not use plugins, remove the following lines |
|
###### which starting with PLUGIN* |
|
#### (2) cmo, file2, socket |
#### (2) cmo, file2, socket |
#### Note : if you change below, make the same changes at AAA. |
|
PLUGIN = ../plugin |
PLUGIN = ../plugin |
PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/cmo.h $(PLUGIN)/ox.h |
TRANS = ../trans |
PLUGIN_LIB = $(PLUGIN)/sm1Socket.a $(PLUGIN)/cmo.a $(PLUGIN)/file2.a $(PLUGIN)/ox.a |
PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/cmo.h $(PLUGIN)/ox.h $(TRANS)/trans.h |
PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/cmo.hh $(PLUGIN)/ox.hh |
PLUGIN_LIB = $(PLUGIN)/sm1Socket.a $(PLUGIN)/cmo.a $(PLUGIN)/file2.a $(PLUGIN)/ox.a $(TRANS)/trans.a |
PLUGIN_SM1 = $(PLUGIN)/sm1Socket.sm1 $(PLUGIN)/file2.sm1 $(PLUGIN)/cmo.sm1 $(PLUGIN)/oxx.sm1 |
PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/cmo.hh $(PLUGIN)/ox.hh $(TRANS)/trans.hh |
|
PLUGIN_SM1 = $(PLUGIN)/sm1Socket.sm1 $(PLUGIN)/file2.sm1 $(PLUGIN)/cmo.sm1 $(PLUGIN)/oxx.sm1 $(TRANS)/trans.sm1 |
PLUGIN_LINKFLAG = |
PLUGIN_LINKFLAG = |
#### AAA (2) cmo, file2, socket |
|
#PLUGIN = ../plugin |
|
#PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/cmo.h $(PLUGIN)/ox.h |
|
#PLUGIN_LIB = $(PLUGIN)/sm1Socket.a $(PLUGIN)/cmo.a $(PLUGIN)/file2.a $(PLUGIN)/ox.a |
|
#PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/cmo.hh $(PLUGIN)/ox.hh |
|
#PLUGIN_SM1 = $(PLUGIN)/sm1Socket.sm1 $(PLUGIN)/file2.sm1 $(PLUGIN)/cmo.sm1 $(PLUGIN)/oxx.sm1 |
|
#PLUGIN_LINKFLAG = |
|
#### (3) cmo only |
|
#PLUGIN = ../plugin |
|
#PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/cmo.h |
|
#PLUGIN_LIB = $(PLUGIN)/cmo.a |
|
#PLUGIN_EXT = $(PLUGIN)/cmo.hh |
|
#PLUGIN_SM1 = |
|
#PLUGIN_LINKFLAG = |
|
### (4) sm1 with asir, file2, socket cmo. |
|
### You also need the special GC for asir. |
|
#PLUGIN = ../plugin |
|
#PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sample.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/asir.h $(PLUGIN)/cmo.h |
|
#PLUGIN_LIB = $(PLUGIN)/file2.a $(PLUGIN)/sample.a $(PLUGIN)/sm1Socket.a $(PLUGIN)/libasir.a $(PLUGIN)/asirconv.a $(PLUGIN)/ak.a $(PLUGIN)/cmo.a |
|
#PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sample.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/asir.hh $(PLUGIN)/cmo.hh |
|
#PLUGIN_SM1 = $(PLUGIN)/file2.sm1 $(PLUGIN)/sample.sm1 $(PLUGIN)/sm1Socket.sm1 |
|
#PLUGIN_LINKFLAG = -lpari -lXaw -lXmu -L/usr/X11R6/lib -lXt -lX11 -lXt -lSM -lICE -lXext -lX11 -lm |
|
############################ end of configuration ######################## |
############################ end of configuration ######################## |
|
|
#HEADERS = datatype.h stackm.h lookup.h extern.h kclass.h Makefile |
configure: Makefile |
|
|
|
Makefile: Makefile.in |
|
sh ./configure |
|
|
|
|
HEADERS = datatype.h stackm.h lookup.h extern.h kclass.h |
HEADERS = datatype.h stackm.h lookup.h extern.h kclass.h |
.c.o : |
.c.o : |
$(CC) -I$(OpenXM_include) $(CFLAGS) $(DDD) -c $< |
${CC} -I${OpenXM_include} ${CFLAGS} ${DDD} -c $< |
|
|
kanlibP = kanExport0.o kanExport1.o |
kanlibP = kanExport0.o kanExport1.o |
kanlibS1 = stackmachine.o |
kanlibS1 = stackmachine.o |
Line 88 kanlibS2 = scanner.o scanner2.o list.o global.o kclass |
|
Line 49 kanlibS2 = scanner.o scanner2.o list.o global.o kclass |
|
kanlibS3 = usage.o option.o |
kanlibS3 = usage.o option.o |
kanlibS4 = primitive.o |
kanlibS4 = primitive.o |
kanlibK = matrix.o poly4.o replace.o poly3.o poly3a.o poly.o output.o coeff.o order.o switch.o poly2.o parser.o parserpass0.o rat.o ext.o |
kanlibK = matrix.o poly4.o replace.o poly3.o poly3a.o poly.o output.o coeff.o order.o switch.o poly2.o parser.o parserpass0.o rat.o ext.o |
kanlibK2 = gradedset.o red.o gb.o gbGM.o syz0.o redm.o sugar.o resol.o hilbert.o |
kanlibK2 = gradedset.o red.o gb.o gbGM.o syz0.o redm.o sugar.o resol.o hilbert.o ecart.o |
kanlibKclass = Kclass/sample.o Kclass/rawcmo.o Kclass/indeterminate.o |
kanlibKclass = Kclass/sample.o Kclass/rawcmo.o Kclass/indeterminate.o Kclass/tree.o |
|
|
##### Add also to Kclass/Makefile |
##### Add also to Kclass/Makefile |
Kclass/sample.o : $(HEADERS) Kclass/sample.c |
Kclass/sample.o : $(HEADERS) Kclass/sample.c |
(cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) sample.o ) |
(cd Kclass ; make CC=${CC} OpenXM_HOME=../${OpenXM_HOME} CFLAGS='${CFLAGS}' sample.o ) |
Kclass/rawcmo.o : $(HEADERS) Kclass/rawcmo.c |
Kclass/rawcmo.o : $(HEADERS) Kclass/rawcmo.c |
(cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) rawcmo.o ) |
(cd Kclass ; make CC=${CC} OpenXM_HOME=../${OpenXM_HOME} CFLAGS='${CFLAGS}' rawcmo.o ) |
Kclass/indeterminate.o : $(HEADERS) Kclass/indeterminate.c |
Kclass/indeterminate.o : $(HEADERS) Kclass/indeterminate.c |
(cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) indeterminate.o ) |
(cd Kclass ; make CC=${CC} OpenXM_HOME=../${OpenXM_HOME} CFLAGS='${CFLAGS}' indeterminate.o ) |
|
Kclass/tree.o : $(HEADERS) Kclass/tree.c |
|
(cd Kclass ; make CC=${CC} OpenXM_HOME=../${OpenXM_HOME} CFLAGS='${CFLAGS}' tree.o ) |
|
|
|
|
###### |
###### |
Line 110 gbGM.o : extern2.h gradedset.h $(HEADERS) |
|
Line 73 gbGM.o : extern2.h gradedset.h $(HEADERS) |
|
gb.o : extern2.h gradedset.h $(HEADERS) |
gb.o : extern2.h gradedset.h $(HEADERS) |
red.o : extern2.h gradedset.h $(HEADERS) |
red.o : extern2.h gradedset.h $(HEADERS) |
gradedset.o : extern2.h gradedset.h $(HEADERS) |
gradedset.o : extern2.h gradedset.h $(HEADERS) |
|
ecart.o : extern2.h gradedset.h $(HEADERS) |
|
|
######## |
######## |
matrix.o : extern2.h matrix.h $(HEADERS) |
matrix.o : extern2.h matrix.h $(HEADERS) |
Line 126 coeff.o : extern2.h $(HEADERS) |
|
Line 90 coeff.o : extern2.h $(HEADERS) |
|
output.o : extern2.h $(HEADERS) |
output.o : extern2.h $(HEADERS) |
poly.o : extern2.h $(HEADERS) |
poly.o : extern2.h $(HEADERS) |
rat.o : extern2.h $(HEADERS) |
rat.o : extern2.h $(HEADERS) |
ext.o : extern2.h $(HEADERS) plugin.h plugin.hh |
ext.o : extern2.h $(HEADERS) plugin.h plugin.hh Kclass/tree.hh |
|
sm.o : sm.c $(HEADERS) |
|
|
MSG0 = msg0.o |
sm1 : sm.o $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) |
|
${CC} -I${OpenXM_include} $(CFLAGS) -o sm1 sm.o $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) $(PLUGIN_LINKFLAG) $(LIBS2) $(LIBS) |
|
|
sm1 : sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) ${GC} |
|
if test `uname` = "SunOS" ; \ |
|
then \ |
|
$(CC) -I$(OpenXM_include) $(CFLAGS) $(DDD) -o sm1 sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) $(LIBGMP) ${GC} $(PLUGIN_LINKFLAG) $(SOLARISLIB) ; \ |
|
else \ |
|
$(CC) ${STATIC_LINK_FLAG} -I$(OpenXM_include) $(CFLAGS) $(DDD) -o sm1 sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) $(LIBGMP) ${GC} $(PLUGIN_LINKFLAG) ; \ |
|
fi |
|
|
|
|
|
$(kanlibP) : $(HEADERS) gradedset.h extern2.h |
$(kanlibP) : $(HEADERS) gradedset.h extern2.h |
$(kanlibS1) : $(HEADERS) smacro.h gradedset.h |
$(kanlibS1) : $(HEADERS) smacro.h gradedset.h |
$(kanlibS2) : $(HEADERS) gradedset.h extern2.h |
$(kanlibS2) : $(HEADERS) gradedset.h extern2.h |
Line 146 $(kanlibS3) : $(HEADERS) gradedset.h extern2.h |
|
Line 104 $(kanlibS3) : $(HEADERS) gradedset.h extern2.h |
|
$(kanlibS4) : $(HEADERS) gradedset.h |
$(kanlibS4) : $(HEADERS) gradedset.h |
|
|
|
|
kanlib.a : $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) kanlib.o |
kanlib.a : $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) kanlib.o ${OpenXM_lib}/libox_pathfinder.a |
(cd plugin-tmp; /bin/rm -f *.o; ../ar-decomp $(PLUGIN_LIB) ; cp ../kanlib.o .) |
(cd plugin-tmp; /bin/rm -f *.o; ../ar-decomp $(PLUGIN_LIB) ; cp ../kanlib.o .) |
|
(cd plugin-tmp; ../ar-decomp ${OpenXM_lib}/libox_pathfinder.a) |
ar ru kanlib.a $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) plugin-tmp/*.o |
ar ru kanlib.a $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) plugin-tmp/*.o |
../gc/if_not_there ../gc/on_sparc_sunos5 ranlib kanlib.a |
${RANLIB} kanlib.a |
|
|
##sm1 : sm.c kanlib.a $(GC) |
|
## $(CC) -I$(OpenXM_include) $(CFLAGS) $(DDD) -o sm1 sm.c kanlib.a $(LIBGMP) $(GC) $(SOLARISLIB) $(PLUGIN_LINKFLAG) |
|
|
|
|
|
############ smacro.h and lookup.h |
############ smacro.h and lookup.h |
smacro.h : smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 mm $(PLUGIN_SM1) |
smacro.h : smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 mm $(PLUGIN_SM1) |
touch smacro.h |
touch smacro.h |
|
|
mklookup : mklookup.c |
mklookup : mklookup.c |
$(CC) -I$(OpenXM_include) -o mklookup mklookup.c |
$(CC) -I$(OpenXM_include) -o mklookup mklookup.c |
|
|
############# sm1 stack machine without algebraic part. |
|
sm00 : sm.c $(kanlibS1) $(kanlibS2) $(kanlibP) $(PLUGIN_LIB) ${GC} |
|
$(CC) -I$(OpenXM_include) $(CFLAGS) $(DDD) -o sm00 sm.c $(kanlibS1) $(kanlibS2) $(PLUGIN_LIB) $(LIBGMP) ${GC} $(PLUGIN_LINKFLAG) $(SOLARISLIB) |
|
|
|
############### plugins |
############### plugins |
plugin.hh : Makefile $(PLUGIN_EXT) |
plugin.hh : Makefile $(PLUGIN_EXT) |
Line 190 plugin.sm1 : Makefile $(PLUGIN_SM1) |
|
Line 142 plugin.sm1 : Makefile $(PLUGIN_SM1) |
|
rm -f plugin.sm1 |
rm -f plugin.sm1 |
echo '%% Do not edit this file.' > plugin.sm1 |
echo '%% Do not edit this file.' > plugin.sm1 |
|
|
install-lib: kanlib.a |
|
cp ../plugin/kancmo.h /usr/src/local/yama |
|
cp kanlib.a /usr/src/local/yama/kanlib.a |
|
|
|
|
|
clean : |
clean : |
rm -f mklookup mm core sm1 lookup.h smacro.h *.o *~ *.a mon.out sm1.nogc kanlib.a plugin.h plugin.hh plugin-tmp/*.o Kclass/*.o Kclass/*~ makeconf makeconf.sed |
rm -f mklookup mm core sm1 lookup.h smacro.h *.o *~ *.a mon.out sm1.nogc kanlib.a plugin.h plugin.hh plugin-tmp/*.o Kclass/*.o Kclass/*~ makeconf makeconf.sed |
|
distclean : clean |
cleana : |
rm -f Makefile |
rm -f mklookup mm core sm1 lookup.h smacro.h *.o *~ *.a mon.out sm1.nogc kanlib.a plugin.h plugin.hh plugin-tmp/*.o Kclass/*.o Kclass/*~ makeconf makeconf.sed Makefile |
|