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

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

1.25    ! takayama    1: # $OpenXM: OpenXM/src/k097/Makefile,v 1.24 2003/05/14 07:29:53 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.21      takayama   27: LIBGMP=-L$(OpenXM_HOME)/lib -lgmp
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
1.25    ! takayama   38: PATHFINDER = -L${OpenXM_lib} -lox_pathfinder
1.1       maekawa    39:
1.23      takayama   40: all : d0 k0 ox_k0
1.1       maekawa    41:
                     42:
                     43: d0 : simple.tab.o d.o dic.o dm.c
1.25    ! takayama   44:        $(CC) ${STATIC_LINK_FLAG} $(FLAG) $(DDD) -o d0 dm.c d.o dic.o simple.tab.o ${PATHFINDER}
1.1       maekawa    45:
                     46: d.o : d.c simple.tab.h Stable/sm1symbol.h
1.25    ! takayama   47:        $(CC) -I${OpenXM_include} $(FLAG) $(DDD) -o d.o -c d.c
1.1       maekawa    48:
                     49: simple.tab.o : simple.tab.c
1.9       takayama   50:        $(CC) $(FLAG) $(DDD) -o simple.tab.o -c simple.tab.c
1.1       maekawa    51:
                     52: simple.tab.c : simple.y d.h
                     53:        $(MYYACC) $(YACCPREFIX) simple.y
                     54:
                     55: simple.tab.h : simple.y d.h
                     56:        $(MYYACC) $(YACCPREFIX) -d simple.y
                     57:
                     58: Stable/sm1symbo.h : Stable/reserved.txt
                     59:        (cd Stable; make)
                     60:
                     61: clean :
                     62:        rm -f simple d0 k0 test0 *.o *~  simple.output asir-tmp.t asir-tmp.tt asir-tmp-out.t asir-tmp-out.tt k2
                     63:        (cd Stable; make clean)
                     64:        (cd try; make clean)
                     65: ##     rm -f simple.tab.c simple.tab.h
                     66:
                     67: test:   d0
                     68:        touch t.sm1
                     69:        /bin/rm t.sm1
                     70:        ./d0 <test.ccc >t.sm1
                     71:
                     72: slib:   d0
                     73:        touch slib.sm1
                     74:        /bin/rm slib.sm1
                     75:        ./d0 -DebugMode <slib.k >slib.sm1
1.16      takayama   76:
                     77: slib.sm1 : slib.k
                     78:        make slib
1.1       maekawa    79:
                     80: ####################################################################
                     81: #############    kxx main parts.
                     82: ###################################################################
                     83: KXX = simple.tab.o d.o ki.o dic.o
                     84:
1.19      takayama   85: k0 :  k0.o $(KXX) $(KAN_HOME)/kanlib.a $(KAN_HOME)/lookup.h
1.2       takayama   86:        if test `uname` = "SunOS" ; \
                     87:        then \
1.15      takayama   88:        $(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   89:        else \
1.15      takayama   90:        $(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   91:        fi
1.1       maekawa    92:
                     93: k0.o : k2.c
1.15      takayama   94:        $(CC) -c $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o k0.o k2.c
1.1       maekawa    95:
                     96: ki.o : ki.c
1.15      takayama   97:        $(CC) -c $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o ki.o ki.c
1.1       maekawa    98:
                     99: dic.o : dic.c d.h
1.9       takayama  100:        $(CC) -c $(FLAG) $(DDD)  -o dic.o dic.c
1.1       maekawa   101:
                    102: $(KAN_HOME)/kanlib.a : $(KAN_HOME)/sm1
                    103:        (cd $(KAN_HOME); make kanlib.a)
                    104:
                    105: kanlib.a :
                    106:        (cd $(KAN_HOME); make kanlib.a)
                    107:
                    108: $(KAN_HOME)/lookup.h :
                    109:        (cd $(KAN_HOME); make lookup.h)
                    110:
1.22      takayama  111:
                    112: ox_k0 : ox_k0.c k0 ox_k0.c sm1sm.c
                    113:        $(CC) ${STATIC_LINK_FLAG} $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o ox_k0 ox_k0.c sm1sm.c $(KXX)  $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB)
1.1       maekawa   114:
                    115: ##########
                    116: ## A sample to compilation:  source is test0.c, output is test0
1.15      takayama  117: test0 :  test0.c  $(KXX) $(KAN_HOME)/kanlib.a  $(GC)  $(KAN_HOME)/lookup.h
                    118:        $(CC) $(FLAG) $(DDD) -I$(OpenXM_include) -I$(KAN_HOME) -o test0 test0.c $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC)
1.1       maekawa   119:
                    120:
                    121:
1.3       takayama  122: install0 : all
1.5       takayama  123:        cp -f k0 d0 $(HOME)/.Hbin
1.1       maekawa   124:        cp lib/mklib $(HOME)/.Hbin
                    125:        echo "Set the environment variable in $(HOME)/bin/mklib"
1.3       takayama  126:
1.8       takayama  127: install : all install-lib
1.18      takayama  128:        /bin/rm -f ../../bin/k0 ../../bin/d0
1.5       takayama  129:        cp -f k0 d0 ../../bin
1.23      takayama  130:        cp -f ox_k0 ../../bin
                    131:        cp -f ox_k0 ../../lib/sm1/bin
1.8       takayama  132:
1.14      takayama  133: install-for-debug : all install-lib-for-debug
1.23      takayama  134:        rm -f ../../bin/k0 ../../bin/d0 ../../bin/ox_k0 ../../lib/sm1/bin/ox_k0
1.14      takayama  135:        (cd ../../bin ; ln -s ../src/k097/k0 k0)
                    136:        (cd ../../bin ; ln -s ../src/k097/d0 d0)
1.23      takayama  137:        (cd ../../bin ; ln -s ../src/k097/ox_k0 ox_k0)
1.24      takayama  138:        (cd ../../lib/sm1/bin ; ln -s ../../../../src/k097/ox_k0 ox_k0)
1.14      takayama  139:
1.8       takayama  140: install-lib :
                    141:        /bin/rm -rf $(OpenXM_lib)/k097
                    142:        mkdir $(OpenXM_lib)/k097
                    143:        cp -f $(KHOME)/Doc/var.sm1 $(OpenXM_lib)/k097
1.17      takayama  144:        cp -rf *.sm1 *.k *.kk debug lib $(OpenXM_lib)/k097
1.8       takayama  145:
1.14      takayama  146: install-lib-for-debug :
1.8       takayama  147:        /bin/rm -rf $(OpenXM_lib)/k097
                    148:        ln -s ../src/k097 $(OpenXM_lib)/k097
1.1       maekawa   149:
                    150: dist :
                    151:        ./makeDist

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