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