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

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

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

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