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

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

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

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