Annotation of OpenXM/src/kan96xx/Kan/Makefile, Revision 1.4
1.4 ! takayama 1: ### $OpenXM: OpenXM/src/kan96xx/Kan/Makefile,v 1.3 1999/11/27 13:24:41 takayama Exp $
1.1 maekawa 2: all : sm1
1.4 ! takayama 3: .SUFFIXES:
1.1 maekawa 4: ########################## configuration ##############################
5: #### What C compiler do you use?
6: CC = gcc
7: #### Gargabe collector? If GC = nogc.c, then you need to define -DNOGC.
8: GC = ../gc/gc.a
9: ##GC = /fuji/taka/noro/libgc.a
10: ##GC = /dosc/work/noro/libgc.a
11: #GC = nogc.c
12: #### -D options
13: DDD =
14: #DDD = -DNOGC
15:
16: #### Optimization level etc.
17: #CFLAGS =
18: #### option for dbx
19: CFLAGS = -O
20: #### optimizer which seems not to be reliable at level 2,3 and 4.
21: #CFLAGS = -O
22: #### profiler to output mon.out
23: #CFLAGS = -O
24:
25: GMP_HOME = ../gmp
26: GMP_HOME2 = ../../gmp
1.3 takayama 27: LIBGMP = $(GMP_HOME)/libgmp.a
1.1 maekawa 28: ## This line is for buggy linux-gmp.
29: ##LIBGMP = $(GMP_HOME)/libgmp.a $(GMP_HOME)/mpn/libmpn.a
30:
1.2 takayama 31: ## Library you need on Solaris 2.*
32: SOLARISLIB = -lnsl -lsocket /usr/ucblib/libucb.a
1.1 maekawa 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)
1.2 takayama 131: if test `uname` = "SunOS" ; \
132: then \
133: $(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) ; \
134: else \
135: $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm1 sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) $(LIBGMP) $(GC) $(PLUGIN_LINKFLAG) ; \
136: fi
137:
1.1 maekawa 138:
139: $(kanlibP) : $(HEADERS) gradedset.h extern2.h
140: $(kanlibS1) : $(HEADERS) smacro.h gradedset.h
141: $(kanlibS2) : $(HEADERS) gradedset.h extern2.h
142: $(kanlibS3) : $(HEADERS) gradedset.h extern2.h
143: $(kanlibS4) : $(HEADERS) gradedset.h
144:
145:
146: kanlib.a : $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) kanlib.o
147: (cd plugin-tmp; /bin/rm -f *.o; ../ar-decomp $(PLUGIN_LIB) ; cp ../kanlib.o .)
148: ar ru kanlib.a $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) plugin-tmp/*.o
149: ../gc/if_not_there ../gc/on_sparc_sunos5 ranlib kanlib.a
150:
151: ##sm1 : sm.c kanlib.a $(GC)
152: ## $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm1 sm.c kanlib.a $(LIBGMP) $(GC) $(SOLARISLIB) $(PLUGIN_LINKFLAG)
153:
154:
155: ############ smacro.h and lookup.h
156: smacro.h : smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 mm $(PLUGIN_SM1)
157: touch smacro.h
158: /bin/rm smacro.h
159: cat smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 $(PLUGIN_SM1) | ./mm >smacro.h
160:
161: lookup.h : stackm.h mklookup
162: touch lookup.h
163: /bin/rm lookup.h
164: ./mklookup >lookup.h
165:
166: mm : mm.c
167: $(CC) -o mm mm.c
168: mklookup : mklookup.c
169: $(CC) -I$(GMP_HOME) -o mklookup mklookup.c
170:
171: ############# sm1 stack machine without algebraic part.
172: sm00 : sm.c $(kanlibS1) $(kanlibS2) $(kanlibP) $(PLUGIN_LIB) $(GC)
173: $(CC) -I$(GMP_HOME) $(CFLAGS) $(DDD) -o sm00 sm.c $(kanlibS1) $(kanlibS2) $(PLUGIN_LIB) $(LIBGMP) $(GC) $(PLUGIN_LINKFLAG) $(SOLARISLIB)
174:
175: ############### plugins
176: plugin.hh : Makefile $(PLUGIN_EXT)
177: rm -f plugin.hh
178: echo '/* Do not edit this file. */' > plugin.hh
179: ./cat0 $(PLUGIN_EXT) >>plugin.hh
180:
181: plugin.h : Makefile $(PLUGIN_PROTOTYPE)
182: rm -f plugin.h
183: echo '/* Do not edit this file. */' > plugin.h
184: ./cat0 $(PLUGIN_PROTOTYPE) >>plugin.h
185:
186: plugin.sm1 : Makefile $(PLUGIN_SM1)
187: rm -f plugin.sm1
188: echo '%% Do not edit this file.' > plugin.sm1
189:
190: install-lib: kanlib.a
191: cp ../plugin/kancmo.h /usr/src/local/yama
192: cp kanlib.a /usr/src/local/yama/kanlib.a
193:
194:
195: clean :
196: 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/*~
197:
198: cleana :
199: 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>