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

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

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