[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/Makefile, Revision 1.7

1.7     ! takayama    1: ###  $OpenXM: OpenXM/src/kan96xx/Kan/Makefile,v 1.6 2000/02/01 04:24:20 takayama Exp $
1.1       maekawa     2: all : sm1
1.5       takayama    3: # .SUFFIXES:
1.1       maekawa     4: ########################## configuration ##############################
                      5: ####  What C compiler do you use?
                      6: CC = gcc
                      7: #### Gargabe collector? If GC = nogc.c, then you need to define -DNOGC.
                      8: GC = ../gc/gc.a
                      9: #GC = nogc.c
                     10: #### -D options
1.6       takayama   11: DDD = -D_BSD_SOURCE
                     12: #DDD = -DNOGC -D_BSD_SOURCE
1.7     ! takayama   13: LINKFLAG = -static
1.1       maekawa    14:
                     15: #### Optimization level etc.
                     16: #CFLAGS =
                     17: #### option  for dbx
                     18: CFLAGS = -O
                     19: #### optimizer which seems not to be  reliable at level 2,3 and 4.
                     20: #CFLAGS = -O
                     21: #### profiler to output mon.out
                     22: #CFLAGS = -O
                     23:
                     24: GMP_HOME = ../gmp
                     25: GMP_HOME2 = ../../gmp
1.3       takayama   26: LIBGMP = $(GMP_HOME)/libgmp.a
1.1       maekawa    27: ## This line is for buggy linux-gmp.
                     28: ##LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a
                     29:
1.2       takayama   30: ## Library you need on Solaris 2.*
                     31: SOLARISLIB = -lnsl -lsocket /usr/ucblib/libucb.a
1.1       maekawa    32:
                     33: ###################  Plugin modules
                     34: ## Note that you need to make PLUGIN_LIB by your hand.
                     35: ## Example:
                     36: ##  (1)
                     37: ##PLUGIN = ../plugin
                     38: ##PLUGIN_PROTOTYPE  = $(PLUGIN)/sample.h  $(PLUGIN)/graphic0.h
                     39: ##PLUGIN_LIB  = $(PLUGIN)/sample.a $(PLUGIN)/graphic0.a
                     40: ##PLUGIN_EXT = $(PLUGIN)/sample.hh $(PLUGIN)/graphic0.hh
                     41: ##PLUGIN_SM1 =$(PLUGIN)/sample.sm1 $(PLUGIN)/graphic0.sm1
                     42: ##PLUGIN_LINKFLAG = -lx11
                     43: ###### end of example.   If you do not use plugins, remove the following lines
                     44: ######                   which starting with PLUGIN*
                     45: ####  (2) cmo, file2, socket
                     46: #### Note : if you change below, make the same changes at AAA.
                     47: PLUGIN = ../plugin
                     48: PLUGIN_PROTOTYPE  = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sm1Socket.h  $(PLUGIN)/cmo.h $(PLUGIN)/ox.h
                     49: PLUGIN_LIB  = $(PLUGIN)/sm1Socket.a  $(PLUGIN)/cmo.a $(PLUGIN)/file2.a $(PLUGIN)/ox.a
                     50: PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/cmo.hh  $(PLUGIN)/ox.hh
                     51: PLUGIN_SM1 = $(PLUGIN)/sm1Socket.sm1 $(PLUGIN)/file2.sm1 $(PLUGIN)/cmo.sm1 $(PLUGIN)/oxx.sm1
                     52: PLUGIN_LINKFLAG =
                     53: ####  AAA (2) cmo, file2, socket
                     54: #PLUGIN = ../plugin
                     55: #PLUGIN_PROTOTYPE  = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sm1Socket.h  $(PLUGIN)/cmo.h $(PLUGIN)/ox.h
                     56: #PLUGIN_LIB  = $(PLUGIN)/sm1Socket.a  $(PLUGIN)/cmo.a $(PLUGIN)/file2.a $(PLUGIN)/ox.a
                     57: #PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/cmo.hh  $(PLUGIN)/ox.hh
                     58: #PLUGIN_SM1 = $(PLUGIN)/sm1Socket.sm1 $(PLUGIN)/file2.sm1 $(PLUGIN)/cmo.sm1 $(PLUGIN)/oxx.sm1
                     59: #PLUGIN_LINKFLAG =
                     60: ####  (3)  cmo only
                     61: #PLUGIN = ../plugin
                     62: #PLUGIN_PROTOTYPE  = $(PLUGIN)/mathcap.h $(PLUGIN)/cmo.h
                     63: #PLUGIN_LIB  = $(PLUGIN)/cmo.a
                     64: #PLUGIN_EXT = $(PLUGIN)/cmo.hh
                     65: #PLUGIN_SM1 =
                     66: #PLUGIN_LINKFLAG =
                     67: ###  (4) sm1 with asir, file2, socket cmo.
                     68: ###      You also need the special GC for asir.
                     69: #PLUGIN = ../plugin
                     70: #PLUGIN_PROTOTYPE  = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sample.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/asir.h $(PLUGIN)/cmo.h
                     71: #PLUGIN_LIB  = $(PLUGIN)/file2.a $(PLUGIN)/sample.a $(PLUGIN)/sm1Socket.a $(PLUGIN)/libasir.a $(PLUGIN)/asirconv.a $(PLUGIN)/ak.a $(PLUGIN)/cmo.a
                     72: #PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sample.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/asir.hh $(PLUGIN)/cmo.hh
                     73: #PLUGIN_SM1 = $(PLUGIN)/file2.sm1 $(PLUGIN)/sample.sm1 $(PLUGIN)/sm1Socket.sm1
                     74: #PLUGIN_LINKFLAG = -lpari  -lXaw -lXmu -L/usr/X11R6/lib -lXt -lX11 -lXt -lSM -lICE -lXext -lX11  -lm
                     75: ############################ end of configuration ########################
                     76:
                     77: #HEADERS = datatype.h  stackm.h lookup.h extern.h  kclass.h Makefile
                     78: HEADERS = datatype.h  stackm.h lookup.h extern.h  kclass.h
                     79: .c.o :
                     80:        $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -c  $<
                     81:
                     82: kanlibP = kanExport0.o kanExport1.o
                     83: kanlibS1 = stackmachine.o
                     84: kanlibS2 = scanner.o scanner2.o list.o global.o kclass.o
                     85: kanlibS3 = usage.o option.o
                     86: kanlibS4 = primitive.o
                     87: kanlibK = matrix.o poly4.o replace.o poly3.o poly.o output.o coeff.o order.o switch.o poly2.o parser.o parserpass0.o rat.o ext.o
                     88: kanlibK2 = gradedset.o red.o gb.o gbGM.o syz0.o redm.o sugar.o resol.o hilbert.o
                     89: kanlibKclass = Kclass/sample.o Kclass/rawcmo.o Kclass/indeterminate.o
                     90:
                     91: ##### Add also to Kclass/Makefile
                     92: Kclass/sample.o : $(HEADERS) Kclass/sample.c
                     93:        (cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) sample.o )
                     94: Kclass/rawcmo.o : $(HEADERS) Kclass/rawcmo.c
                     95:        (cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) rawcmo.o )
                     96: Kclass/indeterminate.o : $(HEADERS) Kclass/indeterminate.c
                     97:        (cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) indeterminate.o )
                     98:
                     99:
                    100: ######
                    101: redm.o : extern2.h gradedset.h $(HEADERS)
                    102: sugar.o : extern2.h gradedset.h $(HEADERS)
                    103: syz0.o : extern2.h gradedset.h $(HEADERS)
                    104: resol.o : extern2.h gradedset.h $(HEADERS)
                    105: hilbert.o : extern2.h gradedset.h $(HEADERS)
                    106: gbGM.o : extern2.h gradedset.h $(HEADERS)
                    107: gb.o : extern2.h gradedset.h $(HEADERS)
                    108: red.o : extern2.h gradedset.h $(HEADERS)
                    109: gradedset.o : extern2.h gradedset.h $(HEADERS)
                    110:
                    111: ########
                    112: matrix.o : extern2.h matrix.h $(HEADERS)
                    113: poly4.o : extern2.h matrix.h $(HEADERS)
                    114: replace3.o : extern2.h $(HEADERS)
                    115: poly3.o : extern2.h $(HEADERS)
                    116: parserpass0.o : extern2.h $(HEADERS)
                    117: parser.o : extern2.h $(HEADERS)
                    118: poly2.o : extern2.h $(HEADERS)
                    119: switch.o : extern2.h $(HEADERS) gradedset.h
                    120: order.o : extern2.h $(HEADERS)
                    121: coeff.o : extern2.h $(HEADERS)
                    122: output.o : extern2.h $(HEADERS)
                    123: poly.o : extern2.h $(HEADERS)
                    124: rat.o : extern2.h $(HEADERS)
                    125: ext.o : extern2.h $(HEADERS) plugin.h plugin.hh
                    126:
                    127: MSG0 = msg0.o
                    128:
                    129: sm1 : sm.c  $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) $(GC)
1.2       takayama  130:        if test `uname` = "SunOS" ; \
                    131:        then \
1.7     ! takayama  132:        $(CC) ${LINKFLAG} -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm1 sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2)  $(kanlibKclass) $(PLUGIN_LIB) $(LIBGMP) $(GC) $(PLUGIN_LINKFLAG) $(SOLARISLIB) ; \
1.2       takayama  133:        else \
1.7     ! takayama  134:        $(CC) ${LINKFLAG} -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm1 sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2)  $(kanlibKclass) $(PLUGIN_LIB) $(LIBGMP) $(GC) $(PLUGIN_LINKFLAG)  ; \
1.2       takayama  135:        fi
                    136:
1.1       maekawa   137:
                    138: $(kanlibP) : $(HEADERS)  gradedset.h extern2.h
                    139: $(kanlibS1) : $(HEADERS) smacro.h  gradedset.h
                    140: $(kanlibS2) : $(HEADERS) gradedset.h extern2.h
                    141: $(kanlibS3) : $(HEADERS) gradedset.h extern2.h
                    142: $(kanlibS4) : $(HEADERS) gradedset.h
                    143:
                    144:
                    145: kanlib.a : $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) kanlib.o
                    146:        (cd plugin-tmp; /bin/rm -f *.o; ../ar-decomp $(PLUGIN_LIB) ; cp ../kanlib.o .)
                    147:        ar ru kanlib.a $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) plugin-tmp/*.o
                    148:        ../gc/if_not_there ../gc/on_sparc_sunos5 ranlib kanlib.a
                    149:
                    150: ##sm1 : sm.c kanlib.a  $(GC)
                    151: ##     $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm1 sm.c kanlib.a $(LIBGMP) $(GC) $(SOLARISLIB) $(PLUGIN_LINKFLAG)
                    152:
                    153:
                    154: ############ smacro.h  and lookup.h
                    155: smacro.h : smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 mm $(PLUGIN_SM1)
                    156:        touch smacro.h
                    157:        /bin/rm smacro.h
                    158:        cat smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 $(PLUGIN_SM1) | ./mm >smacro.h
                    159:
                    160: lookup.h : stackm.h mklookup
                    161:        touch lookup.h
                    162:        /bin/rm lookup.h
                    163:        ./mklookup >lookup.h
                    164:
                    165: mm : mm.c
                    166:        $(CC) -o mm mm.c
                    167: mklookup : mklookup.c
                    168:        $(CC) -I$(GMP_HOME) -o mklookup mklookup.c
                    169:
                    170: ############# sm1 stack machine without algebraic part.
                    171: sm00 : sm.c  $(kanlibS1) $(kanlibS2)  $(kanlibP) $(PLUGIN_LIB) $(GC)
                    172:        $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm00 sm.c $(kanlibS1) $(kanlibS2) $(PLUGIN_LIB) $(LIBGMP) $(GC) $(PLUGIN_LINKFLAG) $(SOLARISLIB)
                    173:
                    174: ############### plugins
                    175: plugin.hh  : Makefile $(PLUGIN_EXT)
                    176:        rm -f plugin.hh
                    177:        echo '/* Do not edit this file. */' > plugin.hh
                    178:        ./cat0 $(PLUGIN_EXT) >>plugin.hh
                    179:
                    180: plugin.h : Makefile $(PLUGIN_PROTOTYPE)
                    181:        rm -f plugin.h
                    182:        echo '/* Do not edit this file. */' > plugin.h
                    183:        ./cat0 $(PLUGIN_PROTOTYPE) >>plugin.h
                    184:
                    185: plugin.sm1 : Makefile $(PLUGIN_SM1)
                    186:        rm -f plugin.sm1
                    187:        echo '%% Do not edit this file.' > plugin.sm1
                    188:
                    189: install-lib: kanlib.a
                    190:        cp ../plugin/kancmo.h /usr/src/local/yama
                    191:        cp kanlib.a   /usr/src/local/yama/kanlib.a
                    192:
                    193:
                    194: clean :
                    195:        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/*~
                    196:
                    197: cleana :
                    198:        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/*~

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>