Annotation of OpenXM/src/kan96xx/Kan/Makefile, Revision 1.1.1.1
1.1 maekawa 1: all : sm1
2: ########################## configuration ##############################
3: #### What C compiler do you use?
4: CC = gcc
5: #### Gargabe collector? If GC = nogc.c, then you need to define -DNOGC.
6: GC = ../gc/gc.a
7: ##GC = /fuji/taka/noro/libgc.a
8: ##GC = /dosc/work/noro/libgc.a
9: #GC = nogc.c
10: #### -D options
11: DDD =
12: #DDD = -DNOGC
13:
14: #### Optimization level etc.
15: #CFLAGS =
16: #### option for dbx
17: CFLAGS = -O
18: #### optimizer which seems not to be reliable at level 2,3 and 4.
19: #CFLAGS = -O
20: #### profiler to output mon.out
21: #CFLAGS = -O
22:
23: GMP_HOME = ../gmp
24: GMP_HOME2 = ../../gmp
25: LIBGMP=$(GMP_HOME)/libgmp.a
26: ## This line is for buggy linux-gmp.
27: ##LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a
28:
29: SOLARISLIB =
30: ## If you are using Solaris 2.x and you need to compile sm1 with socket
31: ## interface (make sm1_socket), uncommnet the following line.
32: ## SOLARISLIB = -lnsl -lsocket /usr/ucblib/libucb.a
33:
34: ################### Plugin modules
35: ## Note that you need to make PLUGIN_LIB by your hand.
36: ## Example:
37: ## (1)
38: ##PLUGIN = ../plugin
39: ##PLUGIN_PROTOTYPE = $(PLUGIN)/sample.h $(PLUGIN)/graphic0.h
40: ##PLUGIN_LIB = $(PLUGIN)/sample.a $(PLUGIN)/graphic0.a
41: ##PLUGIN_EXT = $(PLUGIN)/sample.hh $(PLUGIN)/graphic0.hh
42: ##PLUGIN_SM1 =$(PLUGIN)/sample.sm1 $(PLUGIN)/graphic0.sm1
43: ##PLUGIN_LINKFLAG = -lx11
44: ###### end of example. If you do not use plugins, remove the following lines
45: ###### which starting with PLUGIN*
46: #### (2) cmo, file2, socket
47: #### Note : if you change below, make the same changes at AAA.
48: PLUGIN = ../plugin
49: PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/cmo.h $(PLUGIN)/ox.h
50: PLUGIN_LIB = $(PLUGIN)/sm1Socket.a $(PLUGIN)/cmo.a $(PLUGIN)/file2.a $(PLUGIN)/ox.a
51: PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/cmo.hh $(PLUGIN)/ox.hh
52: PLUGIN_SM1 = $(PLUGIN)/sm1Socket.sm1 $(PLUGIN)/file2.sm1 $(PLUGIN)/cmo.sm1 $(PLUGIN)/oxx.sm1
53: PLUGIN_LINKFLAG =
54: #### AAA (2) cmo, file2, socket
55: #PLUGIN = ../plugin
56: #PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/cmo.h $(PLUGIN)/ox.h
57: #PLUGIN_LIB = $(PLUGIN)/sm1Socket.a $(PLUGIN)/cmo.a $(PLUGIN)/file2.a $(PLUGIN)/ox.a
58: #PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/cmo.hh $(PLUGIN)/ox.hh
59: #PLUGIN_SM1 = $(PLUGIN)/sm1Socket.sm1 $(PLUGIN)/file2.sm1 $(PLUGIN)/cmo.sm1 $(PLUGIN)/oxx.sm1
60: #PLUGIN_LINKFLAG =
61: #### (3) cmo only
62: #PLUGIN = ../plugin
63: #PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/cmo.h
64: #PLUGIN_LIB = $(PLUGIN)/cmo.a
65: #PLUGIN_EXT = $(PLUGIN)/cmo.hh
66: #PLUGIN_SM1 =
67: #PLUGIN_LINKFLAG =
68: ### (4) sm1 with asir, file2, socket cmo.
69: ### You also need the special GC for asir.
70: #PLUGIN = ../plugin
71: #PLUGIN_PROTOTYPE = $(PLUGIN)/mathcap.h $(PLUGIN)/file2.h $(PLUGIN)/sample.h $(PLUGIN)/sm1Socket.h $(PLUGIN)/asir.h $(PLUGIN)/cmo.h
72: #PLUGIN_LIB = $(PLUGIN)/file2.a $(PLUGIN)/sample.a $(PLUGIN)/sm1Socket.a $(PLUGIN)/libasir.a $(PLUGIN)/asirconv.a $(PLUGIN)/ak.a $(PLUGIN)/cmo.a
73: #PLUGIN_EXT = $(PLUGIN)/file2.hh $(PLUGIN)/sample.hh $(PLUGIN)/sm1Socket.hh $(PLUGIN)/asir.hh $(PLUGIN)/cmo.hh
74: #PLUGIN_SM1 = $(PLUGIN)/file2.sm1 $(PLUGIN)/sample.sm1 $(PLUGIN)/sm1Socket.sm1
75: #PLUGIN_LINKFLAG = -lpari -lXaw -lXmu -L/usr/X11R6/lib -lXt -lX11 -lXt -lSM -lICE -lXext -lX11 -lm
76: ############################ end of configuration ########################
77:
78: #HEADERS = datatype.h stackm.h lookup.h extern.h kclass.h Makefile
79: HEADERS = datatype.h stackm.h lookup.h extern.h kclass.h
80: .c.o :
81: $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -c $<
82:
83: kanlibP = kanExport0.o kanExport1.o
84: kanlibS1 = stackmachine.o
85: kanlibS2 = scanner.o scanner2.o list.o global.o kclass.o
86: kanlibS3 = usage.o option.o
87: kanlibS4 = primitive.o
88: kanlibK = matrix.o poly4.o replace.o poly3.o poly.o output.o coeff.o order.o switch.o poly2.o parser.o parserpass0.o rat.o ext.o
89: kanlibK2 = gradedset.o red.o gb.o gbGM.o syz0.o redm.o sugar.o resol.o hilbert.o
90: kanlibKclass = Kclass/sample.o Kclass/rawcmo.o Kclass/indeterminate.o
91:
92: ##### Add also to Kclass/Makefile
93: Kclass/sample.o : $(HEADERS) Kclass/sample.c
94: (cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) sample.o )
95: Kclass/rawcmo.o : $(HEADERS) Kclass/rawcmo.c
96: (cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) rawcmo.o )
97: Kclass/indeterminate.o : $(HEADERS) Kclass/indeterminate.c
98: (cd Kclass ; make CC=$(CC) GMP_HOME2=$(GMP_HOME2) CFLAGS=$(CFLAGS) DDD=$(DDD) indeterminate.o )
99:
100:
101: ######
102: redm.o : extern2.h gradedset.h $(HEADERS)
103: sugar.o : extern2.h gradedset.h $(HEADERS)
104: syz0.o : extern2.h gradedset.h $(HEADERS)
105: resol.o : extern2.h gradedset.h $(HEADERS)
106: hilbert.o : extern2.h gradedset.h $(HEADERS)
107: gbGM.o : extern2.h gradedset.h $(HEADERS)
108: gb.o : extern2.h gradedset.h $(HEADERS)
109: red.o : extern2.h gradedset.h $(HEADERS)
110: gradedset.o : extern2.h gradedset.h $(HEADERS)
111:
112: ########
113: matrix.o : extern2.h matrix.h $(HEADERS)
114: poly4.o : extern2.h matrix.h $(HEADERS)
115: replace3.o : extern2.h $(HEADERS)
116: poly3.o : extern2.h $(HEADERS)
117: parserpass0.o : extern2.h $(HEADERS)
118: parser.o : extern2.h $(HEADERS)
119: poly2.o : extern2.h $(HEADERS)
120: switch.o : extern2.h $(HEADERS) gradedset.h
121: order.o : extern2.h $(HEADERS)
122: coeff.o : extern2.h $(HEADERS)
123: output.o : extern2.h $(HEADERS)
124: poly.o : extern2.h $(HEADERS)
125: rat.o : extern2.h $(HEADERS)
126: ext.o : extern2.h $(HEADERS) plugin.h plugin.hh
127:
128: MSG0 = msg0.o
129:
130: sm1 : sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) $(GC)
131: $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm1 sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) $(LIBGMP) $(GC) $(PLUGIN_LINKFLAG) $(SOLARISLIB)
132:
133: $(kanlibP) : $(HEADERS) gradedset.h extern2.h
134: $(kanlibS1) : $(HEADERS) smacro.h gradedset.h
135: $(kanlibS2) : $(HEADERS) gradedset.h extern2.h
136: $(kanlibS3) : $(HEADERS) gradedset.h extern2.h
137: $(kanlibS4) : $(HEADERS) gradedset.h
138:
139:
140: kanlib.a : $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) kanlib.o
141: (cd plugin-tmp; /bin/rm -f *.o; ../ar-decomp $(PLUGIN_LIB) ; cp ../kanlib.o .)
142: ar ru kanlib.a $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) plugin-tmp/*.o
143: ../gc/if_not_there ../gc/on_sparc_sunos5 ranlib kanlib.a
144:
145: ##sm1 : sm.c kanlib.a $(GC)
146: ## $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm1 sm.c kanlib.a $(LIBGMP) $(GC) $(SOLARISLIB) $(PLUGIN_LINKFLAG)
147:
148:
149: ############ smacro.h and lookup.h
150: smacro.h : smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 mm $(PLUGIN_SM1)
151: touch smacro.h
152: /bin/rm smacro.h
153: cat smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 $(PLUGIN_SM1) | ./mm >smacro.h
154:
155: lookup.h : stackm.h mklookup
156: touch lookup.h
157: /bin/rm lookup.h
158: ./mklookup >lookup.h
159:
160: mm : mm.c
161: $(CC) -o mm mm.c
162: mklookup : mklookup.c
163: $(CC) -I$(GMP_HOME) -o mklookup mklookup.c
164:
165: ############# sm1 stack machine without algebraic part.
166: sm00 : sm.c $(kanlibS1) $(kanlibS2) $(kanlibP) $(PLUGIN_LIB) $(GC)
167: $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm00 sm.c $(kanlibS1) $(kanlibS2) $(PLUGIN_LIB) $(LIBGMP) $(GC) $(PLUGIN_LINKFLAG) $(SOLARISLIB)
168:
169: ############### plugins
170: plugin.hh : Makefile $(PLUGIN_EXT)
171: rm -f plugin.hh
172: echo '/* Do not edit this file. */' > plugin.hh
173: ./cat0 $(PLUGIN_EXT) >>plugin.hh
174:
175: plugin.h : Makefile $(PLUGIN_PROTOTYPE)
176: rm -f plugin.h
177: echo '/* Do not edit this file. */' > plugin.h
178: ./cat0 $(PLUGIN_PROTOTYPE) >>plugin.h
179:
180: plugin.sm1 : Makefile $(PLUGIN_SM1)
181: rm -f plugin.sm1
182: echo '%% Do not edit this file.' > plugin.sm1
183:
184: install-lib: kanlib.a
185: cp ../plugin/kancmo.h /usr/src/local/yama
186: cp kanlib.a /usr/src/local/yama/kanlib.a
187:
188:
189: clean :
190: rm -f mklookup mm core sm1 lookup.h smacro.h *.o *~ *.a mon.out sm1.nogc kanlib.a plugin.h plugin.hh plugin-tmp/*.o Kclass/*.o Kclass/*~
191:
192: cleana :
193: rm -f mklookup mm core sm1 lookup.h smacro.h *.o *~ *.a mon.out sm1.nogc kanlib.a plugin.h plugin.hh plugin-tmp/*.o Kclass/*.o Kclass/*~
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>