Makefile revision 1.9.4.2 1 1.9.4.2 nathanw # $NetBSD: Makefile,v 1.9.4.2 2002/06/20 03:39:19 nathanw Exp $
2 1.9.4.2 nathanw
3 1.9.4.2 nathanw # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
4 1.9.4.2 nathanw # M68000 Hi-Performance Microprocessor Division
5 1.9.4.2 nathanw # M68040 Software Package
6 1.9.4.2 nathanw #
7 1.9.4.2 nathanw # M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
8 1.9.4.2 nathanw # All rights reserved.
9 1.9.4.2 nathanw #
10 1.9.4.2 nathanw # THE SOFTWARE is provided on an "AS IS" basis and without warranty.
11 1.9.4.2 nathanw # To the maximum extent permitted by applicable law,
12 1.9.4.2 nathanw # MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
13 1.9.4.2 nathanw # INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
14 1.9.4.2 nathanw # PARTICULAR PURPOSE and any warranty against infringement with
15 1.9.4.2 nathanw # regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
16 1.9.4.2 nathanw # and any accompanying written materials.
17 1.9.4.2 nathanw #
18 1.9.4.2 nathanw # To the maximum extent permitted by applicable law,
19 1.9.4.2 nathanw # IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
20 1.9.4.2 nathanw # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS
21 1.9.4.2 nathanw # PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR
22 1.9.4.2 nathanw # OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE
23 1.9.4.2 nathanw # SOFTWARE. Motorola assumes no responsibility for the maintenance
24 1.9.4.2 nathanw # and support of the SOFTWARE.
25 1.9.4.2 nathanw #
26 1.9.4.2 nathanw # You are hereby granted a copyright license to use, modify, and
27 1.9.4.2 nathanw # distribute the SOFTWARE so long as this entire notice is retained
28 1.9.4.2 nathanw # without alteration in any modified and/or redistributed versions,
29 1.9.4.2 nathanw # and that such modified versions are clearly identified as such.
30 1.9.4.2 nathanw # No licenses are granted by implication, estoppel or otherwise
31 1.9.4.2 nathanw # under any patents or trademarks of Motorola, Inc.
32 1.9.4.2 nathanw
33 1.9.4.2 nathanw #
34 1.9.4.2 nathanw # Makefile 3.3 3/27/91
35 1.9.4.2 nathanw #
36 1.9.4.2 nathanw # Makefile for 68040 Floating Point Software Package
37 1.9.4.2 nathanw #
38 1.9.4.2 nathanw
39 1.9.4.2 nathanw TARGET = fpsp
40 1.9.4.2 nathanw
41 1.9.4.2 nathanw CPPFLAGS= ${FPSPCPPFLAGS} ${FPSPMISCCPPFLAGS}
42 1.9.4.2 nathanw .SUFFIXES: .o .s .sa .defs .h
43 1.9.4.2 nathanw
44 1.9.4.2 nathanw .PATH.h: ${FPSPDIR}
45 1.9.4.2 nathanw .PATH.s: ${FPSPDIR}
46 1.9.4.2 nathanw .PATH.sa: ${FPSPDIR}
47 1.9.4.2 nathanw
48 1.9.4.2 nathanw AS? = as
49 1.9.4.2 nathanw LD? = ld
50 1.9.4.2 nathanw .if defined(HAVE_GCC3)
51 1.9.4.2 nathanw AFLAGS = -x assembler-with-cpp -m68040
52 1.9.4.2 nathanw .else
53 1.9.4.2 nathanw AFLAGS = -x assembler-with-cpp -traditional-cpp -m68040
54 1.9.4.2 nathanw .endif
55 1.9.4.2 nathanw
56 1.9.4.2 nathanw #
57 1.9.4.2 nathanw # For the Library Version:
58 1.9.4.2 nathanw #
59 1.9.4.2 nathanw AR? = ar
60 1.9.4.2 nathanw LIB_FILTER = sed 's/fpsp.defs/l_fpsp.defs/'
61 1.9.4.2 nathanw LIB_TARGET = lib$(TARGET).a
62 1.9.4.2 nathanw #
63 1.9.4.2 nathanw # SYS selects the template set to use
64 1.9.4.2 nathanw # templates are supplied for R3V6, CI5 and GEN(generic)
65 1.9.4.2 nathanw # PREFIX is a string that begins a temporary label in the assembler
66 1.9.4.2 nathanw # R3V6 uses 'L%', CI5 likes '.L'
67 1.9.4.2 nathanw #
68 1.9.4.2 nathanw #SYS = R3V6
69 1.9.4.2 nathanw #PREFIX = L%%
70 1.9.4.2 nathanw #
71 1.9.4.2 nathanw #SYS = CI5
72 1.9.4.2 nathanw #PREFIX = .L
73 1.9.4.2 nathanw #
74 1.9.4.2 nathanw #SYS = GEN
75 1.9.4.2 nathanw #PREFIX = L_
76 1.9.4.2 nathanw #
77 1.9.4.2 nathanw SYS = GCC
78 1.9.4.2 nathanw PREFIX = L_
79 1.9.4.2 nathanw
80 1.9.4.2 nathanw .sa.s:
81 1.9.4.2 nathanw sh ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
82 1.9.4.2 nathanw .h.defs:
83 1.9.4.2 nathanw sh ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
84 1.9.4.2 nathanw .s.o:
85 1.9.4.2 nathanw ${CC} ${AFLAGS} ${CPPFLAGS} -c -o ${.TARGET} ${.IMPSRC}
86 1.9.4.2 nathanw
87 1.9.4.2 nathanw H_FILES = \
88 1.9.4.2 nathanw fpsp.defs \
89 1.9.4.2 nathanw l_fpsp.defs
90 1.9.4.2 nathanw
91 1.9.4.2 nathanw O_FILES = \
92 1.9.4.2 nathanw copyright.o \
93 1.9.4.2 nathanw netbsd.o \
94 1.9.4.2 nathanw bindec.o \
95 1.9.4.2 nathanw binstr.o \
96 1.9.4.2 nathanw decbin.o \
97 1.9.4.2 nathanw do_func.o \
98 1.9.4.2 nathanw gen_except.o \
99 1.9.4.2 nathanw get_op.o \
100 1.9.4.2 nathanw kernel_ex.o \
101 1.9.4.2 nathanw res_func.o \
102 1.9.4.2 nathanw round.o \
103 1.9.4.2 nathanw sacos.o \
104 1.9.4.2 nathanw sasin.o \
105 1.9.4.2 nathanw satan.o \
106 1.9.4.2 nathanw satanh.o \
107 1.9.4.2 nathanw scosh.o \
108 1.9.4.2 nathanw setox.o \
109 1.9.4.2 nathanw sgetem.o \
110 1.9.4.2 nathanw sint.o \
111 1.9.4.2 nathanw slogn.o \
112 1.9.4.2 nathanw slog2.o \
113 1.9.4.2 nathanw smovecr.o \
114 1.9.4.2 nathanw srem_mod.o \
115 1.9.4.2 nathanw scale.o \
116 1.9.4.2 nathanw ssin.o \
117 1.9.4.2 nathanw ssinh.o \
118 1.9.4.2 nathanw stan.o \
119 1.9.4.2 nathanw stanh.o \
120 1.9.4.2 nathanw sto_res.o \
121 1.9.4.2 nathanw stwotox.o \
122 1.9.4.2 nathanw tbldo.o \
123 1.9.4.2 nathanw util.o \
124 1.9.4.2 nathanw x_bsun.o \
125 1.9.4.2 nathanw x_fline.o \
126 1.9.4.2 nathanw x_operr.o \
127 1.9.4.2 nathanw x_ovfl.o \
128 1.9.4.2 nathanw x_snan.o \
129 1.9.4.2 nathanw x_store.o \
130 1.9.4.2 nathanw x_unfl.o \
131 1.9.4.2 nathanw x_unimp.o \
132 1.9.4.2 nathanw x_unsupp.o \
133 1.9.4.2 nathanw bugfix.o
134 1.9.4.2 nathanw
135 1.9.4.2 nathanw LIB_O_FILES = \
136 1.9.4.2 nathanw l_copyright.o \
137 1.9.4.2 nathanw l_entry.o \
138 1.9.4.2 nathanw l_do_func.o \
139 1.9.4.2 nathanw l_round.o \
140 1.9.4.2 nathanw l_sacos.o \
141 1.9.4.2 nathanw l_sasin.o \
142 1.9.4.2 nathanw l_satan.o \
143 1.9.4.2 nathanw l_satanh.o \
144 1.9.4.2 nathanw l_scale.o \
145 1.9.4.2 nathanw l_scosh.o \
146 1.9.4.2 nathanw l_setox.o \
147 1.9.4.2 nathanw l_sgetem.o \
148 1.9.4.2 nathanw l_sint.o \
149 1.9.4.2 nathanw l_slog2.o \
150 1.9.4.2 nathanw l_slogn.o \
151 1.9.4.2 nathanw l_srem_mod.o \
152 1.9.4.2 nathanw l_ssin.o \
153 1.9.4.2 nathanw l_ssinh.o \
154 1.9.4.2 nathanw l_stan.o \
155 1.9.4.2 nathanw l_stanh.o \
156 1.9.4.2 nathanw l_stwotox.o \
157 1.9.4.2 nathanw l_support.o
158 1.9.4.2 nathanw
159 1.9.4.2 nathanw S_FILES = \
160 1.9.4.2 nathanw netbsd.s \
161 1.9.4.2 nathanw bindec.s \
162 1.9.4.2 nathanw binstr.s \
163 1.9.4.2 nathanw decbin.s \
164 1.9.4.2 nathanw do_func.s \
165 1.9.4.2 nathanw get_op.s \
166 1.9.4.2 nathanw gen_except.s \
167 1.9.4.2 nathanw kernel_ex.s \
168 1.9.4.2 nathanw res_func.s \
169 1.9.4.2 nathanw round.s \
170 1.9.4.2 nathanw sacos.s \
171 1.9.4.2 nathanw sasin.s \
172 1.9.4.2 nathanw satan.s \
173 1.9.4.2 nathanw satanh.s \
174 1.9.4.2 nathanw scosh.s \
175 1.9.4.2 nathanw setox.s \
176 1.9.4.2 nathanw sgetem.s \
177 1.9.4.2 nathanw sint.s \
178 1.9.4.2 nathanw slogn.s \
179 1.9.4.2 nathanw slog2.s \
180 1.9.4.2 nathanw smovecr.s \
181 1.9.4.2 nathanw srem_mod.s \
182 1.9.4.2 nathanw scale.s \
183 1.9.4.2 nathanw ssin.s \
184 1.9.4.2 nathanw ssinh.s \
185 1.9.4.2 nathanw stan.s \
186 1.9.4.2 nathanw stanh.s \
187 1.9.4.2 nathanw sto_res.s \
188 1.9.4.2 nathanw stwotox.s \
189 1.9.4.2 nathanw tbldo.s \
190 1.9.4.2 nathanw util.s \
191 1.9.4.2 nathanw x_bsun.s \
192 1.9.4.2 nathanw x_fline.s \
193 1.9.4.2 nathanw x_operr.s \
194 1.9.4.2 nathanw x_ovfl.s \
195 1.9.4.2 nathanw x_snan.s \
196 1.9.4.2 nathanw x_store.s \
197 1.9.4.2 nathanw x_unfl.s \
198 1.9.4.2 nathanw x_unimp.s \
199 1.9.4.2 nathanw x_unsupp.s \
200 1.9.4.2 nathanw bugfix.s
201 1.9.4.2 nathanw
202 1.9.4.2 nathanw LIB_S_FILES = \
203 1.9.4.2 nathanw l_entry.sa l_entry.s \
204 1.9.4.2 nathanw l_do_func.s \
205 1.9.4.2 nathanw l_round.s \
206 1.9.4.2 nathanw l_sacos.s \
207 1.9.4.2 nathanw l_sasin.s \
208 1.9.4.2 nathanw l_satan.s \
209 1.9.4.2 nathanw l_satanh.s \
210 1.9.4.2 nathanw l_scale.s \
211 1.9.4.2 nathanw l_scosh.s \
212 1.9.4.2 nathanw l_setox.s \
213 1.9.4.2 nathanw l_sgetem.s \
214 1.9.4.2 nathanw l_sint.s \
215 1.9.4.2 nathanw l_slog2.s \
216 1.9.4.2 nathanw l_slogn.s \
217 1.9.4.2 nathanw l_srem_mod.s \
218 1.9.4.2 nathanw l_ssin.s \
219 1.9.4.2 nathanw l_ssinh.s \
220 1.9.4.2 nathanw l_stan.s \
221 1.9.4.2 nathanw l_stanh.s \
222 1.9.4.2 nathanw l_stwotox.s \
223 1.9.4.2 nathanw l_support.s
224 1.9.4.2 nathanw
225 1.9.4.2 nathanw #
226 1.9.4.2 nathanw # Build the target object. The linkfile is created on the fly.
227 1.9.4.2 nathanw # Change the SEG directives to suit your system.
228 1.9.4.2 nathanw #
229 1.9.4.2 nathanw $(TARGET).o: $(O_FILES)
230 1.9.4.2 nathanw $(LD) -r -o $(TARGET).o $(O_FILES)
231 1.9.4.2 nathanw
232 1.9.4.2 nathanw #
233 1.9.4.2 nathanw # Just about every file needs fpsp.h so:
234 1.9.4.2 nathanw #
235 1.9.4.2 nathanw $(O_FILES): fpsp.defs
236 1.9.4.2 nathanw
237 1.9.4.2 nathanw #
238 1.9.4.2 nathanw #-----------------------------------------------------------------------
239 1.9.4.2 nathanw #
240 1.9.4.2 nathanw # For making a library version of the FPSP:
241 1.9.4.2 nathanw #
242 1.9.4.2 nathanw library: $(LIB_TARGET)
243 1.9.4.2 nathanw
244 1.9.4.2 nathanw $(LIB_TARGET): $(LIB_O_FILES)
245 1.9.4.2 nathanw rm -f $(LIB_TARGET)
246 1.9.4.2 nathanw $(AR) crv $(LIB_TARGET) $(LIB_O_FILES)
247 1.9.4.2 nathanw
248 1.9.4.2 nathanw $(LIB_O_FILES): l_fpsp.defs
249 1.9.4.2 nathanw
250 1.9.4.2 nathanw #
251 1.9.4.2 nathanw # The entry points to the library version are created here
252 1.9.4.2 nathanw # by using two template files an awk script and a list of
253 1.9.4.2 nathanw # the entry routines for each function.
254 1.9.4.2 nathanw #
255 1.9.4.2 nathanw l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h
256 1.9.4.2 nathanw awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - <L_LIST|sh>l_entry.sa
257 1.9.4.2 nathanw
258 1.9.4.2 nathanw #
259 1.9.4.2 nathanw # Do_func.sa and round.sa need special editing to remove references that
260 1.9.4.2 nathanw # aren't needed in the library version. Beware that changes in
261 1.9.4.2 nathanw # the source code may cause this editing to break....
262 1.9.4.2 nathanw #
263 1.9.4.2 nathanw l_do_func.s: do_func.s
264 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
265 1.9.4.2 nathanw echo '/global.*do_func/,/^ rts/d' >.SCRIPT
266 1.9.4.2 nathanw echo 'g/smovcr/d' >>.SCRIPT
267 1.9.4.2 nathanw echo 'g/tblpre/d' >>.SCRIPT
268 1.9.4.2 nathanw echo 'w' >>.SCRIPT
269 1.9.4.2 nathanw echo 'q' >>.SCRIPT
270 1.9.4.2 nathanw ed - ${.TARGET} <.SCRIPT
271 1.9.4.2 nathanw rm .SCRIPT
272 1.9.4.2 nathanw
273 1.9.4.2 nathanw l_round.s: round.s
274 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
275 1.9.4.2 nathanw echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT
276 1.9.4.2 nathanw echo 'w' >>.SCRIPT
277 1.9.4.2 nathanw echo 'q' >>.SCRIPT
278 1.9.4.2 nathanw ed - ${.TARGET} <.SCRIPT
279 1.9.4.2 nathanw rm .SCRIPT
280 1.9.4.2 nathanw
281 1.9.4.2 nathanw l_copyright.s: copyright.s
282 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
283 1.9.4.2 nathanw
284 1.9.4.2 nathanw l_sacos.s: sacos.s
285 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
286 1.9.4.2 nathanw
287 1.9.4.2 nathanw l_sasin.s: sasin.s
288 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
289 1.9.4.2 nathanw
290 1.9.4.2 nathanw l_satan.s: satan.s
291 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
292 1.9.4.2 nathanw
293 1.9.4.2 nathanw l_satanh.s: satanh.s
294 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
295 1.9.4.2 nathanw
296 1.9.4.2 nathanw l_scale.s: scale.s
297 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
298 1.9.4.2 nathanw
299 1.9.4.2 nathanw l_scosh.s: scosh.s
300 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
301 1.9.4.2 nathanw
302 1.9.4.2 nathanw l_setox.s: setox.s
303 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
304 1.9.4.2 nathanw
305 1.9.4.2 nathanw l_sgetem.s: sgetem.s
306 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
307 1.9.4.2 nathanw
308 1.9.4.2 nathanw l_sint.s: sint.s
309 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
310 1.9.4.2 nathanw
311 1.9.4.2 nathanw l_slog2.s: slog2.s
312 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
313 1.9.4.2 nathanw
314 1.9.4.2 nathanw l_slogn.s: slogn.s
315 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
316 1.9.4.2 nathanw
317 1.9.4.2 nathanw l_srem_mod.s: srem_mod.s
318 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
319 1.9.4.2 nathanw
320 1.9.4.2 nathanw l_ssin.s: ssin.s
321 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
322 1.9.4.2 nathanw
323 1.9.4.2 nathanw l_ssinh.s: ssinh.s
324 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
325 1.9.4.2 nathanw
326 1.9.4.2 nathanw l_stan.s: stan.s
327 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
328 1.9.4.2 nathanw
329 1.9.4.2 nathanw l_stanh.s: stanh.s
330 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
331 1.9.4.2 nathanw
332 1.9.4.2 nathanw l_stwotox.s: stwotox.s
333 1.9.4.2 nathanw $(LIB_FILTER) ${.ALLSRC} >${.TARGET}
334 1.9.4.2 nathanw
335 1.9.4.2 nathanw #
336 1.9.4.2 nathanw # Extract all files from SCCS directory
337 1.9.4.2 nathanw #
338 1.9.4.2 nathanw clean:
339 1.9.4.2 nathanw rm -f $(H_FILES)
340 1.9.4.2 nathanw rm -f $(S_FILES)
341 1.9.4.2 nathanw rm -f $(O_FILES)
342 1.9.4.2 nathanw rm -f $(TARGET).o
343 1.9.4.2 nathanw rm -f $(LIB_S_FILES)
344 1.9.4.2 nathanw rm -f $(LIB_O_FILES)
345 1.9.4.2 nathanw rm -f $(LIB_TARGET)
346 1.9.4.2 nathanw
347 1.9.4.2 nathanw clobber: clean
348 1.9.4.2 nathanw
349