Annotation of OpenXM/src/k097/Makefile.new, Revision 1.1.1.1
1.1 maekawa 1: BDATE =19970416
2: CC = gcc
3: GC = $(KHOME)/gc/gc.a
4:
5: ## Kan source. kan sources must be built up by hand.
6: KHOME = ../SSkan
7:
8:
9: ##
10: LOAD_K_PATH ='"/usr/local/lib/k0/"'
11: LOAD_SM1_PATH2 ='"/home/nobuki/SSkan/Kan/"'
12: ##
13: GMP_HOME = $(KHOME)/gmp
14: ##LIBGMP=$(GMP_HOME)/libgmp.a
15: ## This line is for buggy linux-gmp.
16: LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a
17: EXTRALIB =
18: ########### end of configuration.
19:
20: ### These are to switch k2 linux and k2 solaris version.
21: SOLARIS_SLIB =
22: #SOLARIS_SLIB = -lsocket -lnsl -lc /usr/ucblib/libucb.a
23: ### if you use K2LFLAG below, you don't need ALIB.
24: #K2LFLAG = -lm $(SOLARIS_ALIB)
25: K2LFLAG = -lfunc -lparse -lengine -lm -Wl,-rpath,/usr/X11R6/lib
26: #CALL_ASIR=callasir.solaris.c
27: CALL_ASIR=callasir.c
28: PARI_LIB = -lpari
29: ###########################################################
30: 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)
31: SOLARIS_EXTRA_INCLUDE = -I$(AHOME)/parse -I$(AHOME)/io
32: ###########################################################
33:
34: CC = gcc
35: MYYACC = bison
36: YACCPREFIX = -p KC
37: FLAG = -g -DLOAD_K_PATH=$(LOAD_K_PATH) -DLOAD_SM1_PATH2=$(LOAD_SM1_PATH2)
38: KAN_HOME = $(KHOME)/Kan
39:
40: all : d0 k0
41:
42: ## Making a new Makefile
43: new :
44: touch Makefile.new
45: /bin/cp Makefile.new Trash
46: /bin/rm -f Makefile.new
47: sed -f new.sed <Makefile >Makefile.new
48:
49: d0 : simple.tab.o d.o dic.o dm.c
50: $(CC) $(FLAG) -o d0 dm.c d.o dic.o simple.tab.o
51:
52: d.o : d.c simple.tab.h Stable/sm1symbol.h
53: $(CC) $(FLAG) -o d.o -c d.c
54:
55: simple.tab.o : simple.tab.c
56: $(CC) $(FLAG) -o simple.tab.o -c simple.tab.c
57:
58: simple.tab.c : simple.y d.h
59: $(MYYACC) $(YACCPREFIX) simple.y
60:
61: simple.tab.h : simple.y d.h
62: $(MYYACC) $(YACCPREFIX) -d simple.y
63:
64: Stable/sm1symbo.h : Stable/reserved.txt
65: (cd Stable; make)
66:
67: clean :
68: rm -f simple d0 k0 test0 *.o *~ simple.output asir-tmp.t asir-tmp.tt asir-tmp-out.t asir-tmp-out.tt k2
69: (cd Stable; make clean)
70: (cd try; make clean)
71: ## rm -f simple.tab.c simple.tab.h
72:
73: backup :
74: cp simple.y d.c dm.c k2.c ki.c msg*.c d.h Makefile *.k incmac.sm1 memo.txt Backup/backup$(BDATE)
75:
76: test: d0
77: touch t.sm1
78: /bin/rm t.sm1
79: ./d0 <test.ccc >t.sm1
80:
81: slib: d0
82: touch slib.sm1
83: /bin/rm slib.sm1
84: ./d0 -DebugMode <slib.k >slib.sm1
85:
86: ####################################################################
87: ############# kxx main parts.
88: ###################################################################
89: KXX = simple.tab.o d.o ki.o dic.o
90: KXXASIR = simple.tab.o d.o ki-asir.o dic.o
91:
92: k0 : k0.o $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(GMP) $(KAN_HOME)/lookup.h
93: $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0 k0.o $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC) $(EXTRALIB)
94:
95: k0.o : k2.c
96: $(CC) -c $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o k0.o k2.c
97:
98: ki.o : ki.c
99: $(CC) -c $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o ki.o ki.c
100:
101: ki-asir.o : ki.c
102: $(CC) -c $(FLAG) -DCALLASIR -I$(GMP_HOME) -I$(KAN_HOME) -o ki-asir.o ki.c
103:
104: dic.o : dic.c d.h
105: $(CC) -c $(FLAG) -o dic.o dic.c
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: ######## How to make k2. k2 is k0&asir&sm1
117: ## asir GC.
118: ASIRGC = $(AHOME)/gc/libgc.a
119: ## asir include
120: ASIR_INCLUDE = $(AHOME)/include
121: ASIR_INCLUDE2 = $(ALIB)/include
122: LFLAG = $(K2LFLAG)
123: GMP = $(LIBGMP)
124: ASIRKAN = $(ASIRKAN_HOME)/ak.a
125: K2INCLUDE = -I$(ASIR_INCLUDE) -I$(ASIR_INCLUDE2) -I$(KHOME)/Kan -I$(ASIRKAN_HOME) $(SOLARIS_EXTRA_INCLUDE)
126:
127: k2 : k2.c $(KAN_HOME)/kanlib.a $(KXXASIR) msg1.o $(ASIRKAN) $(ASIRKAN_HOME)/$(CALL_ASIR) $(ASIRGC) $(GMP)
128: $(CC) $(FLAG) -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)
129:
130: msg1.o : msg1.c
131: $(CC) $(FLAG) -DCALLASIR $(K2INCLUDE) -c msg1.c
132:
133:
134: $(ASIRKAN) :
135: (cd $(ASIRKAN_HOME); make ak.a)
136:
137:
138: $(GMP) :
139: (cd $(KHOME)/gmp ; ./configure; make )
140: $(GC) :
141: (cd $(KHOME)/gc ; make )
142:
143:
144: ##########
145: ## A sample to compilation: source is test0.c, output is test0
146: test0 : test0.c $(KXX) $(KAN_HOME)/kanlib.a $(GC) $(GMP) $(KAN_HOME)/lookup.h
147: $(CC) $(FLAG) -I$(GMP_HOME) -I$(KAN_HOME) -o test0 test0.c $(KXX) $(KAN_HOME)/kanlib.a $(LIBGMP) $(GC)
148:
149:
150:
151: install : all
152: cp --f k0 d0 $(HOME)/.Hbin
153: cp lib/mklib $(HOME)/.Hbin
154: echo "Set the environment variable in $(HOME)/bin/mklib"
155:
156: dist :
157: ./makeDist
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>