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

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

1.19    ! takayama    1: # $OpenXM: OpenXM/src/k097/Makefile,v 1.18 2000/12/21 12:26:58 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.19    ! takayama    9: TOPDIR=../../../OpenXM
        !            10: OpenXM_HOME=${TOPDIR}
1.15      takayama   11: OpenXM_include=$(OpenXM_HOME)/include
1.19    ! takayama   12: OpenXM_lib=../../lib
        !            13: CC = gcc
1.1       maekawa    14: BDATE =19970416
1.19    ! takayama   15: GC = $(OpenXM_HOME)/lib/libgc.a
1.9       takayama   16: DDD=-D_BSD_SOURCE
1.12      takayama   17: #STATIC_LINK_FLAG=-static
                     18: STATIC_LINK_FLAG=
1.1       maekawa    19:
                     20: ## Kan source.  kan sources must be built up by hand.
1.19    ! takayama   21: KHOME = $(OpenXM_HOME)/src/kan96xx
1.1       maekawa    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:
1.2       takayama   33: SOLARIS_SLIB =   -lsocket -lnsl -lc /usr/ucblib/libucb.a
1.1       maekawa    34: MYYACC = bison
                     35: YACCPREFIX = -p KC
                     36: FLAG = -g  -DLOAD_K_PATH=$(LOAD_K_PATH) -DLOAD_SM1_PATH2=$(LOAD_SM1_PATH2)
                     37: KAN_HOME = $(KHOME)/Kan
                     38:
                     39: all : d0 k0
                     40:
                     41: ## Making a new Makefile
                     42: new :
                     43:        touch Makefile.new
                     44:        /bin/cp Makefile.new Trash
                     45:        /bin/rm -f Makefile.new
                     46:        sed -f new.sed <Makefile >Makefile.new
                     47:
                     48: d0 : simple.tab.o d.o dic.o dm.c
1.11      takayama   49:        $(CC) ${STATIC_LINK_FLAG} $(FLAG) $(DDD) -o d0 dm.c d.o dic.o simple.tab.o
1.1       maekawa    50:
                     51: d.o : d.c simple.tab.h Stable/sm1symbol.h
1.9       takayama   52:        $(CC) $(FLAG) $(DDD) -o d.o -c d.c
1.1       maekawa    53:
                     54: simple.tab.o : simple.tab.c
1.9       takayama   55:        $(CC) $(FLAG) $(DDD) -o simple.tab.o -c simple.tab.c
1.1       maekawa    56:
                     57: simple.tab.c : simple.y d.h
                     58:        $(MYYACC) $(YACCPREFIX) simple.y
                     59:
                     60: simple.tab.h : simple.y d.h
                     61:        $(MYYACC) $(YACCPREFIX) -d simple.y
                     62:
                     63: Stable/sm1symbo.h : Stable/reserved.txt
                     64:        (cd Stable; make)
                     65:
                     66: clean :
                     67:        rm -f simple d0 k0 test0 *.o *~  simple.output asir-tmp.t asir-tmp.tt asir-tmp-out.t asir-tmp-out.tt k2
                     68:        (cd Stable; make clean)
                     69:        (cd try; make clean)
                     70: ##     rm -f simple.tab.c simple.tab.h
                     71:
                     72: test:   d0
                     73:        touch t.sm1
                     74:        /bin/rm t.sm1
                     75:        ./d0 <test.ccc >t.sm1
                     76:
                     77: slib:   d0
                     78:        touch slib.sm1
                     79:        /bin/rm slib.sm1
                     80:        ./d0 -DebugMode <slib.k >slib.sm1
1.16      takayama   81:
                     82: slib.sm1 : slib.k
                     83:        make slib
1.1       maekawa    84:
                     85: ####################################################################
                     86: #############    kxx main parts.
                     87: ###################################################################
                     88: KXX = simple.tab.o d.o ki.o dic.o
                     89:
1.19    ! takayama   90: k0 :  k0.o $(KXX) $(KAN_HOME)/kanlib.a $(KAN_HOME)/lookup.h
1.2       takayama   91:        if test `uname` = "SunOS" ; \
                     92:        then \
1.15      takayama   93:        $(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   94:        else \
1.15      takayama   95:        $(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   96:        fi
1.1       maekawa    97:
                     98: k0.o : k2.c
1.15      takayama   99:        $(CC) -c $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o k0.o k2.c
1.1       maekawa   100:
                    101: ki.o : ki.c
1.15      takayama  102:        $(CC) -c $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o ki.o ki.c
1.1       maekawa   103:
                    104: dic.o : dic.c d.h
1.9       takayama  105:        $(CC) -c $(FLAG) $(DDD)  -o dic.o dic.c
1.1       maekawa   106:
                    107: $(KAN_HOME)/kanlib.a : $(KAN_HOME)/sm1
                    108:        (cd $(KAN_HOME); make kanlib.a)
                    109:
                    110: kanlib.a :
                    111:        (cd $(KAN_HOME); make kanlib.a)
                    112:
                    113: $(KAN_HOME)/lookup.h :
                    114:        (cd $(KAN_HOME); make lookup.h)
                    115:
                    116:
                    117: ##########
                    118: ## A sample to compilation:  source is test0.c, output is test0
1.15      takayama  119: test0 :  test0.c  $(KXX) $(KAN_HOME)/kanlib.a  $(GC)  $(KAN_HOME)/lookup.h
                    120:        $(CC) $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o test0 test0.c $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC)
1.1       maekawa   121:
                    122:
                    123:
1.3       takayama  124: install0 : all
1.5       takayama  125:        cp -f k0 d0 $(HOME)/.Hbin
1.1       maekawa   126:        cp lib/mklib $(HOME)/.Hbin
                    127:        echo "Set the environment variable in $(HOME)/bin/mklib"
1.3       takayama  128:
1.8       takayama  129: install : all install-lib
1.18      takayama  130:        /bin/rm -f ../../bin/k0 ../../bin/d0
1.5       takayama  131:        cp -f k0 d0 ../../bin
1.8       takayama  132:
1.14      takayama  133: install-for-debug : all install-lib-for-debug
                    134:        rm -f ../../bin/k0 ../../bin/d0
                    135:        (cd ../../bin ; ln -s ../src/k097/k0 k0)
                    136:        (cd ../../bin ; ln -s ../src/k097/d0 d0)
                    137:
1.8       takayama  138: install-lib :
                    139:        /bin/rm -rf $(OpenXM_lib)/k097
                    140:        mkdir $(OpenXM_lib)/k097
                    141:        cp -f $(KHOME)/Doc/var.sm1 $(OpenXM_lib)/k097
1.17      takayama  142:        cp -rf *.sm1 *.k *.kk debug lib $(OpenXM_lib)/k097
1.8       takayama  143:
1.14      takayama  144: install-lib-for-debug :
1.8       takayama  145:        /bin/rm -rf $(OpenXM_lib)/k097
                    146:        ln -s ../src/k097 $(OpenXM_lib)/k097
1.1       maekawa   147:
                    148: dist :
                    149:        ./makeDist

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