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

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

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

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