Annotation of OpenXM/src/kan96xx/Kan/Makefile.in, Revision 1.2
1.2 ! takayama 1: ### $OpenXM: OpenXM/src/kan96xx/Kan/Makefile.in,v 1.1 2001/05/20 07:48:19 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
! 22: CFLAGS = -g
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.1 takayama 91: kanlibK2 = gradedset.o red.o gb.o gbGM.o syz0.o redm.o sugar.o resol.o hilbert.o
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)
113:
114: ########
115: matrix.o : extern2.h matrix.h $(HEADERS)
116: poly4.o : extern2.h matrix.h $(HEADERS)
117: replace3.o : extern2.h $(HEADERS)
118: poly3.o : extern2.h $(HEADERS)
1.2 ! takayama 119: poly3a.o : extern2.h $(HEADERS)
1.1 takayama 120: parserpass0.o : extern2.h $(HEADERS)
121: parser.o : extern2.h $(HEADERS)
122: poly2.o : extern2.h $(HEADERS)
123: switch.o : extern2.h $(HEADERS) gradedset.h
124: order.o : extern2.h $(HEADERS)
125: coeff.o : extern2.h $(HEADERS)
126: output.o : extern2.h $(HEADERS)
127: poly.o : extern2.h $(HEADERS)
128: rat.o : extern2.h $(HEADERS)
129: ext.o : extern2.h $(HEADERS) plugin.h plugin.hh
130:
131: MSG0 = msg0.o
132:
133: sm1 : sm.c $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) ${GC}
134: if test `uname` = "SunOS" ; \
135: then \
136: $(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) ; \
137: else \
138: $(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) ; \
139: fi
140:
141:
142: $(kanlibP) : $(HEADERS) gradedset.h extern2.h
143: $(kanlibS1) : $(HEADERS) smacro.h gradedset.h
144: $(kanlibS2) : $(HEADERS) gradedset.h extern2.h
145: $(kanlibS3) : $(HEADERS) gradedset.h extern2.h
146: $(kanlibS4) : $(HEADERS) gradedset.h
147:
148:
149: kanlib.a : $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) $(PLUGIN_LIB) kanlib.o
150: (cd plugin-tmp; /bin/rm -f *.o; ../ar-decomp $(PLUGIN_LIB) ; cp ../kanlib.o .)
151: ar ru kanlib.a $(kanlibS1) $(kanlibS2) $(kanlibS3) $(kanlibS4) $(kanlibP) $(kanlibK) $(kanlibK2) $(kanlibKclass) plugin-tmp/*.o
152: ../gc/if_not_there ../gc/on_sparc_sunos5 ranlib kanlib.a
153:
154: ##sm1 : sm.c kanlib.a $(GC)
155: ## $(CC) -I$(OpenXM_include) $(CFLAGS) $(DDD) -o sm1 sm.c kanlib.a $(LIBGMP) $(GC) $(SOLARISLIB) $(PLUGIN_LINKFLAG)
156:
157:
158: ############ smacro.h and lookup.h
159: smacro.h : smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 mm $(PLUGIN_SM1)
160: touch smacro.h
161: /bin/rm smacro.h
162: cat smacro.sm1 dr.sm1 module1.sm1 sugar.sm1 usage.sm1 $(PLUGIN_SM1) | ./mm >smacro.h
163:
164: lookup.h : stackm.h mklookup
165: touch lookup.h
166: /bin/rm lookup.h
167: ./mklookup >lookup.h
168:
169: mm : mm.c
170: $(CC) -o mm mm.c
171: mklookup : mklookup.c
172: $(CC) -I$(OpenXM_include) -o mklookup mklookup.c
173:
174: ############# sm1 stack machine without algebraic part.
175: sm00 : sm.c $(kanlibS1) $(kanlibS2) $(kanlibP) $(PLUGIN_LIB) ${GC}
176: $(CC) -I$(OpenXM_include) $(CFLAGS) $(DDD) -o sm00 sm.c $(kanlibS1) $(kanlibS2) $(PLUGIN_LIB) $(LIBGMP) ${GC} $(PLUGIN_LINKFLAG) $(SOLARISLIB)
177:
178: ############### plugins
179: plugin.hh : Makefile $(PLUGIN_EXT)
180: rm -f plugin.hh
181: echo '/* Do not edit this file. */' > plugin.hh
182: ./cat0 $(PLUGIN_EXT) >>plugin.hh
183:
184: plugin.h : Makefile $(PLUGIN_PROTOTYPE)
185: rm -f plugin.h
186: echo '/* Do not edit this file. */' > plugin.h
187: ./cat0 $(PLUGIN_PROTOTYPE) >>plugin.h
188:
189: plugin.sm1 : Makefile $(PLUGIN_SM1)
190: rm -f plugin.sm1
191: echo '%% Do not edit this file.' > plugin.sm1
192:
193: install-lib: kanlib.a
194: cp ../plugin/kancmo.h /usr/src/local/yama
195: cp kanlib.a /usr/src/local/yama/kanlib.a
196:
197:
198: clean :
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/*~ makeconf makeconf.sed
200:
201: cleana :
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 Makefile
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>