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