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

Annotation of OpenXM/src/k097/Makefile, Revision 1.8

1.8     ! takayama    1: # $OpenXM: OpenXM/src/k097/Makefile,v 1.7 2000/01/17 21:12:22 takayama Exp $
1.7       takayama    2: # targets
                      3: # all
                      4: #     compile
1.8     ! takayama    5: # intall : all install-lib
1.7       takayama    6: #
1.8     ! takayama    7: # todo : install-lib-for-debug
1.7       takayama    8: #
1.1       maekawa     9: BDATE =19970416
                     10: CC = gcc
                     11: GC = $(KHOME)/gc/gc.a
1.8     ! takayama   12: OpenXM_lib=../../lib
1.1       maekawa    13:
                     14: ## Kan source.  kan sources must be built up by hand.
1.6       takayama   15: KHOME = ../kan96xx
1.1       maekawa    16:
                     17:
                     18: ##
                     19: LOAD_K_PATH ='"/usr/local/lib/k0/"'
                     20: LOAD_SM1_PATH2 ='"/home/nobuki/SSkan/Kan/"'
                     21: ##
                     22: GMP_HOME = $(KHOME)/gmp
1.4       takayama   23: LIBGMP=$(GMP_HOME)/libgmp.a
1.1       maekawa    24: ## This line is for buggy linux-gmp.
1.4       takayama   25: ## LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a
1.1       maekawa    26: EXTRALIB =
                     27: ########### end of configuration.
                     28:
                     29: ### These are to switch k2 linux and k2 solaris version.
1.2       takayama   30: SOLARIS_SLIB =   -lsocket -lnsl -lc /usr/ucblib/libucb.a
1.1       maekawa    31: ### if you use K2LFLAG below, you don't need ALIB.
                     32: #K2LFLAG = -lm $(SOLARIS_ALIB)
                     33: K2LFLAG = -lfunc -lparse -lengine -lm -Wl,-rpath,/usr/X11R6/lib
                     34: #CALL_ASIR=callasir.solaris.c
                     35: CALL_ASIR=callasir.c
                     36: PARI_LIB = -lpari
                     37: ###########################################################
                     38: SOLARIS_ALIB =  -L$(AHOME)/usrlib $(AHOME)/io/tcpf.o $(AHOME)/plot/plotf.o $(AHOME)/builtin/libfunc.a $(AHOME)/parse/libparse.a $(AHOME)/io/libio.a $(AHOME)/engine/libca.a $(AHOME)/asm/libasm.a  $(PARI_LIB) $(SOLARIS_SLIB)
                     39: SOLARIS_EXTRA_INCLUDE = -I$(AHOME)/parse -I$(AHOME)/io
                     40: ###########################################################
                     41:
                     42: CC = gcc
                     43: MYYACC = bison
                     44: YACCPREFIX = -p KC
                     45: FLAG = -g  -DLOAD_K_PATH=$(LOAD_K_PATH) -DLOAD_SM1_PATH2=$(LOAD_SM1_PATH2)
                     46: KAN_HOME = $(KHOME)/Kan
                     47:
                     48: all : d0 k0
                     49:
                     50: ## Making a new Makefile
                     51: new :
                     52:        touch Makefile.new
                     53:        /bin/cp Makefile.new Trash
                     54:        /bin/rm -f Makefile.new
                     55:        sed -f new.sed <Makefile >Makefile.new
                     56:
                     57: d0 : simple.tab.o d.o dic.o dm.c
                     58:        $(CC) $(FLAG) -o d0 dm.c d.o dic.o simple.tab.o
                     59:
                     60: d.o : d.c simple.tab.h Stable/sm1symbol.h
                     61:        $(CC) $(FLAG) -o d.o -c d.c
                     62:
                     63: simple.tab.o : simple.tab.c
                     64:        $(CC) $(FLAG) -o simple.tab.o -c simple.tab.c
                     65:
                     66: simple.tab.c : simple.y d.h
                     67:        $(MYYACC) $(YACCPREFIX) simple.y
                     68:
                     69: simple.tab.h : simple.y d.h
                     70:        $(MYYACC) $(YACCPREFIX) -d simple.y
                     71:
                     72: Stable/sm1symbo.h : Stable/reserved.txt
                     73:        (cd Stable; make)
                     74:
                     75: clean :
                     76:        rm -f simple d0 k0 test0 *.o *~  simple.output asir-tmp.t asir-tmp.tt asir-tmp-out.t asir-tmp-out.tt k2
                     77:        (cd Stable; make clean)
                     78:        (cd try; make clean)
                     79: ##     rm -f simple.tab.c simple.tab.h
                     80:
                     81: backup :
                     82:        cp simple.y d.c dm.c k2.c ki.c msg*.c d.h Makefile  *.k incmac.sm1 memo.txt Backup/backup$(BDATE)
                     83:
                     84: test:   d0
                     85:        touch t.sm1
                     86:        /bin/rm t.sm1
                     87:        ./d0 <test.ccc >t.sm1
                     88:
                     89: slib:   d0
                     90:        touch slib.sm1
                     91:        /bin/rm slib.sm1
                     92:        ./d0 -DebugMode <slib.k >slib.sm1
                     93:
                     94: ####################################################################
                     95: #############    kxx main parts.
                     96: ###################################################################
                     97: KXX = simple.tab.o d.o ki.o dic.o
                     98: KXXASIR = simple.tab.o d.o ki-asir.o dic.o
                     99:
                    100: k0 :  k0.o $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(GMP) $(KAN_HOME)/lookup.h
1.2       takayama  101:        if test `uname` = "SunOS" ; \
                    102:        then \
                    103:        $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0 k0.o $(KXX)  $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) $(SOLARIS_SLIB) ; \
                    104:        else \
                    105:        $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0 k0.o $(KXX)  $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB) ; \
                    106:        fi
1.1       maekawa   107:
                    108: k0.o : k2.c
                    109:        $(CC) -c $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0.o k2.c
                    110:
                    111: ki.o : ki.c
                    112:        $(CC) -c $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o ki.o ki.c
                    113:
                    114: ki-asir.o : ki.c
                    115:        $(CC) -c $(FLAG) -DCALLASIR -I$(GMP_HOME) -I$(KAN_HOME) -o ki-asir.o ki.c
                    116:
                    117: dic.o : dic.c d.h
                    118:        $(CC) -c $(FLAG)  -o dic.o dic.c
                    119:
                    120: $(KAN_HOME)/kanlib.a : $(KAN_HOME)/sm1
                    121:        (cd $(KAN_HOME); make kanlib.a)
                    122:
                    123: kanlib.a :
                    124:        (cd $(KAN_HOME); make kanlib.a)
                    125:
                    126: $(KAN_HOME)/lookup.h :
                    127:        (cd $(KAN_HOME); make lookup.h)
                    128:
                    129: ######## How to make k2.  k2 is k0&asir&sm1
                    130: ## asir GC.
                    131: ASIRGC = $(AHOME)/gc/libgc.a
                    132: ## asir include
                    133: ASIR_INCLUDE = $(AHOME)/include
                    134: ASIR_INCLUDE2 = $(ALIB)/include
                    135: LFLAG = $(K2LFLAG)
                    136: GMP = $(LIBGMP)
                    137: ASIRKAN = $(ASIRKAN_HOME)/ak.a
                    138: K2INCLUDE = -I$(ASIR_INCLUDE)  -I$(ASIR_INCLUDE2) -I$(KHOME)/Kan -I$(ASIRKAN_HOME) $(SOLARIS_EXTRA_INCLUDE)
                    139:
                    140: k2 : k2.c $(KAN_HOME)/kanlib.a  $(KXXASIR) msg1.o $(ASIRKAN) $(ASIRKAN_HOME)/$(CALL_ASIR) $(ASIRGC) $(GMP)
                    141:        $(CC) $(FLAG) -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)
                    142:
                    143: msg1.o : msg1.c
                    144:        $(CC) $(FLAG) -DCALLASIR $(K2INCLUDE) -c msg1.c
                    145:
                    146:
                    147: $(ASIRKAN) :
                    148:        (cd $(ASIRKAN_HOME); make ak.a)
                    149:
                    150:
                    151: $(GMP) :
                    152:        (cd $(KHOME)/gmp ; ./configure; make )
                    153: $(GC) :
                    154:        (cd $(KHOME)/gc ; make )
                    155:
                    156:
                    157: ##########
                    158: ## A sample to compilation:  source is test0.c, output is test0
                    159: test0 :  test0.c  $(KXX) $(KAN_HOME)/kanlib.a  $(GC) $(GMP) $(KAN_HOME)/lookup.h
                    160:        $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o test0 test0.c $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC)
                    161:
                    162:
                    163:
1.3       takayama  164: install0 : all
1.5       takayama  165:        cp -f k0 d0 $(HOME)/.Hbin
1.1       maekawa   166:        cp lib/mklib $(HOME)/.Hbin
                    167:        echo "Set the environment variable in $(HOME)/bin/mklib"
1.3       takayama  168:
1.8     ! takayama  169: install : all install-lib
1.5       takayama  170:        cp -f k0 d0 ../../bin
1.8     ! takayama  171:
        !           172: install-lib :
        !           173:        /bin/rm -rf $(OpenXM_lib)/k097
        !           174:        mkdir $(OpenXM_lib)/k097
        !           175:        cp -f $(KHOME)/Doc/var.sm1 $(OpenXM_lib)/k097
        !           176:        cp -rf *.sm1 *.k *.kk debug $(OpenXM_lib)/k097
        !           177:
        !           178: install-for-debug :
        !           179:        /bin/rm -rf $(OpenXM_lib)/k097
        !           180:        ln -s ../src/k097 $(OpenXM_lib)/k097
1.1       maekawa   181:
                    182: dist :
                    183:        ./makeDist

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