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

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

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

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