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

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

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

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