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