Makefile revision 1.1 1 1.1 mycroft # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
2 1.1 mycroft # M68000 Hi-Performance Microprocessor Division
3 1.1 mycroft # M68040 Software Package
4 1.1 mycroft #
5 1.1 mycroft # M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
6 1.1 mycroft # All rights reserved.
7 1.1 mycroft #
8 1.1 mycroft # THE SOFTWARE is provided on an "AS IS" basis and without warranty.
9 1.1 mycroft # To the maximum extent permitted by applicable law,
10 1.1 mycroft # MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
11 1.1 mycroft # INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
12 1.1 mycroft # PARTICULAR PURPOSE and any warranty against infringement with
13 1.1 mycroft # regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
14 1.1 mycroft # and any accompanying written materials.
15 1.1 mycroft #
16 1.1 mycroft # To the maximum extent permitted by applicable law,
17 1.1 mycroft # IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
18 1.1 mycroft # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS
19 1.1 mycroft # PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR
20 1.1 mycroft # OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE
21 1.1 mycroft # SOFTWARE. Motorola assumes no responsibility for the maintenance
22 1.1 mycroft # and support of the SOFTWARE.
23 1.1 mycroft #
24 1.1 mycroft # You are hereby granted a copyright license to use, modify, and
25 1.1 mycroft # distribute the SOFTWARE so long as this entire notice is retained
26 1.1 mycroft # without alteration in any modified and/or redistributed versions,
27 1.1 mycroft # and that such modified versions are clearly identified as such.
28 1.1 mycroft # No licenses are granted by implication, estoppel or otherwise
29 1.1 mycroft # under any patents or trademarks of Motorola, Inc.
30 1.1 mycroft
31 1.1 mycroft #
32 1.1 mycroft # Makefile 3.3 3/27/91
33 1.1 mycroft #
34 1.1 mycroft # Makefile for 68040 Floating Point Software Package
35 1.1 mycroft #
36 1.1 mycroft
37 1.1 mycroft TARGET = FPSP
38 1.1 mycroft
39 1.1 mycroft ASM = ./pasm
40 1.1 mycroft ASMOPTS = +p=68020/68881 +l +C +M
41 1.1 mycroft PLINK = ./plink
42 1.1 mycroft PLINKOPTS = dummy +q$(TARGET) +w32 +x +i +m$(TARGET).linkmap
43 1.1 mycroft
44 1.1 mycroft #
45 1.1 mycroft # For the Library Version:
46 1.1 mycroft #
47 1.1 mycroft AR = ar
48 1.1 mycroft LIB_FILTER = sed 's/fpsp.h/l_fpsp.h/'
49 1.1 mycroft LIB_TARGET = libFPSP.a
50 1.1 mycroft #
51 1.1 mycroft # SYS selects the template set to use
52 1.1 mycroft # templates are supplied for R3V6, CI5 and GEN(generic)
53 1.1 mycroft # PREFIX is a string that begins a temporary label in the assembler
54 1.1 mycroft # R3V6 uses 'L%', CI5 likes '.L'
55 1.1 mycroft #
56 1.1 mycroft #SYS = R3V6
57 1.1 mycroft #PREFIX = L%%
58 1.1 mycroft #
59 1.1 mycroft #SYS = CI5
60 1.1 mycroft #PREFIX = .L
61 1.1 mycroft #
62 1.1 mycroft SYS = GEN
63 1.1 mycroft PREFIX = L_
64 1.1 mycroft
65 1.1 mycroft .SUFFIXES: .s .s~ .sa .sa~ .ro .h .h~
66 1.1 mycroft
67 1.1 mycroft .sa.ro:
68 1.1 mycroft $(ASM) $(ASMOPTS) $*.sa
69 1.1 mycroft
70 1.1 mycroft .sa~.ro:
71 1.1 mycroft sccs get SCCS/s.$*.sa
72 1.1 mycroft $(ASM) $(ASMOPTS) $*.sa
73 1.1 mycroft rm -f $*.sa
74 1.1 mycroft
75 1.1 mycroft .sa.s:
76 1.1 mycroft asm2as $*.sa >$*.s
77 1.1 mycroft
78 1.1 mycroft .sa~.sa:
79 1.1 mycroft sccs get SCCS/s.$*.sa
80 1.1 mycroft
81 1.1 mycroft .s~.s:
82 1.1 mycroft sccs get SCCS/s.$*.s
83 1.1 mycroft
84 1.1 mycroft .h~.h:
85 1.1 mycroft sccs get SCCS/s.$*.h
86 1.1 mycroft
87 1.1 mycroft RO_FILES = \
88 1.1 mycroft skeleton.ro \
89 1.1 mycroft bindec.ro \
90 1.1 mycroft binstr.ro \
91 1.1 mycroft decbin.ro \
92 1.1 mycroft do_func.ro \
93 1.1 mycroft gen_except.ro \
94 1.1 mycroft get_op.ro \
95 1.1 mycroft kernel_ex.ro \
96 1.1 mycroft res_func.ro \
97 1.1 mycroft round.ro \
98 1.1 mycroft sacos.ro \
99 1.1 mycroft sasin.ro \
100 1.1 mycroft satan.ro \
101 1.1 mycroft satanh.ro \
102 1.1 mycroft scosh.ro \
103 1.1 mycroft setox.ro \
104 1.1 mycroft sgetem.ro \
105 1.1 mycroft sint.ro \
106 1.1 mycroft slogn.ro \
107 1.1 mycroft slog2.ro \
108 1.1 mycroft smovecr.ro \
109 1.1 mycroft srem_mod.ro \
110 1.1 mycroft scale.ro \
111 1.1 mycroft ssin.ro \
112 1.1 mycroft ssinh.ro \
113 1.1 mycroft stan.ro \
114 1.1 mycroft stanh.ro \
115 1.1 mycroft sto_res.ro \
116 1.1 mycroft stwotox.ro \
117 1.1 mycroft tbldo.ro \
118 1.1 mycroft util.ro \
119 1.1 mycroft x_bsun.ro \
120 1.1 mycroft x_fline.ro \
121 1.1 mycroft x_operr.ro \
122 1.1 mycroft x_ovfl.ro \
123 1.1 mycroft x_snan.ro \
124 1.1 mycroft x_store.ro \
125 1.1 mycroft x_unfl.ro \
126 1.1 mycroft x_unimp.ro \
127 1.1 mycroft x_unsupp.ro \
128 1.1 mycroft bugfix.ro \
129 1.1 mycroft FPSP.ro
130 1.1 mycroft
131 1.1 mycroft LIB_RO_FILES = \
132 1.1 mycroft l_entry.ro \
133 1.1 mycroft l_do_func.ro \
134 1.1 mycroft l_round.ro \
135 1.1 mycroft l_sacos.ro \
136 1.1 mycroft l_sasin.ro \
137 1.1 mycroft l_satan.ro \
138 1.1 mycroft l_satanh.ro \
139 1.1 mycroft l_scale.ro \
140 1.1 mycroft l_scosh.ro \
141 1.1 mycroft l_setox.ro \
142 1.1 mycroft l_sgetem.ro \
143 1.1 mycroft l_sint.ro \
144 1.1 mycroft l_slog2.ro \
145 1.1 mycroft l_slogn.ro \
146 1.1 mycroft l_srem_mod.ro \
147 1.1 mycroft l_ssin.ro \
148 1.1 mycroft l_ssinh.ro \
149 1.1 mycroft l_stan.ro \
150 1.1 mycroft l_stanh.ro \
151 1.1 mycroft l_stwotox.ro \
152 1.1 mycroft l_support.ro
153 1.1 mycroft
154 1.1 mycroft SA_FILES = \
155 1.1 mycroft skeleton.sa \
156 1.1 mycroft bindec.sa \
157 1.1 mycroft binstr.sa \
158 1.1 mycroft decbin.sa \
159 1.1 mycroft do_func.sa \
160 1.1 mycroft get_op.sa \
161 1.1 mycroft gen_except.sa \
162 1.1 mycroft kernel_ex.sa \
163 1.1 mycroft res_func.sa \
164 1.1 mycroft round.sa \
165 1.1 mycroft sacos.sa \
166 1.1 mycroft sasin.sa \
167 1.1 mycroft satan.sa \
168 1.1 mycroft satanh.sa \
169 1.1 mycroft scosh.sa \
170 1.1 mycroft setox.sa \
171 1.1 mycroft sgetem.sa \
172 1.1 mycroft sint.sa \
173 1.1 mycroft slogn.sa \
174 1.1 mycroft slog2.sa \
175 1.1 mycroft smovecr.sa \
176 1.1 mycroft srem_mod.sa \
177 1.1 mycroft scale.sa \
178 1.1 mycroft ssin.sa \
179 1.1 mycroft ssinh.sa \
180 1.1 mycroft stan.sa \
181 1.1 mycroft stanh.sa \
182 1.1 mycroft sto_res.sa \
183 1.1 mycroft stwotox.sa \
184 1.1 mycroft tbldo.sa \
185 1.1 mycroft util.sa \
186 1.1 mycroft x_bsun.sa \
187 1.1 mycroft x_fline.sa \
188 1.1 mycroft x_operr.sa \
189 1.1 mycroft x_ovfl.sa \
190 1.1 mycroft x_snan.sa \
191 1.1 mycroft x_store.sa \
192 1.1 mycroft x_unfl.sa \
193 1.1 mycroft x_unimp.sa \
194 1.1 mycroft x_unsupp.sa \
195 1.1 mycroft bugfix.sa \
196 1.1 mycroft FPSP.sa
197 1.1 mycroft
198 1.1 mycroft LIB_SA_FILES = \
199 1.1 mycroft l_entry.sa \
200 1.1 mycroft l_do_func.sa \
201 1.1 mycroft l_round.sa \
202 1.1 mycroft l_sacos.sa \
203 1.1 mycroft l_sasin.sa \
204 1.1 mycroft l_satan.sa \
205 1.1 mycroft l_satanh.sa \
206 1.1 mycroft l_scale.sa \
207 1.1 mycroft l_scosh.sa \
208 1.1 mycroft l_setox.sa \
209 1.1 mycroft l_sgetem.sa \
210 1.1 mycroft l_sint.sa \
211 1.1 mycroft l_slog2.sa \
212 1.1 mycroft l_slogn.sa \
213 1.1 mycroft l_srem_mod.sa \
214 1.1 mycroft l_ssin.sa \
215 1.1 mycroft l_ssinh.sa \
216 1.1 mycroft l_stan.sa \
217 1.1 mycroft l_stanh.sa \
218 1.1 mycroft l_stwotox.sa
219 1.1 mycroft
220 1.1 mycroft H_FILES = \
221 1.1 mycroft fpsp.h \
222 1.1 mycroft l_fpsp.h
223 1.1 mycroft
224 1.1 mycroft U_FILES = \
225 1.1 mycroft unix.s \
226 1.1 mycroft bindec.s \
227 1.1 mycroft binstr.s \
228 1.1 mycroft decbin.s \
229 1.1 mycroft do_func.s \
230 1.1 mycroft get_op.s \
231 1.1 mycroft gen_except.s \
232 1.1 mycroft kernel_ex.s \
233 1.1 mycroft res_func.s \
234 1.1 mycroft round.s \
235 1.1 mycroft sacos.s \
236 1.1 mycroft sasin.s \
237 1.1 mycroft satan.s \
238 1.1 mycroft satanh.s \
239 1.1 mycroft scosh.s \
240 1.1 mycroft setox.s \
241 1.1 mycroft sgetem.s \
242 1.1 mycroft sint.s \
243 1.1 mycroft slogn.s \
244 1.1 mycroft slog2.s \
245 1.1 mycroft smovecr.s \
246 1.1 mycroft srem_mod.s \
247 1.1 mycroft scale.s \
248 1.1 mycroft ssin.s \
249 1.1 mycroft ssinh.s \
250 1.1 mycroft stan.s \
251 1.1 mycroft stanh.s \
252 1.1 mycroft sto_res.s \
253 1.1 mycroft stwotox.s \
254 1.1 mycroft tbldo.s \
255 1.1 mycroft util.s \
256 1.1 mycroft x_bsun.s \
257 1.1 mycroft x_fline.s \
258 1.1 mycroft x_operr.s \
259 1.1 mycroft x_ovfl.s \
260 1.1 mycroft x_snan.s \
261 1.1 mycroft x_store.s \
262 1.1 mycroft x_unfl.s \
263 1.1 mycroft x_unimp.s \
264 1.1 mycroft x_unsupp.s \
265 1.1 mycroft bugfix.s \
266 1.1 mycroft fpsp.mk \
267 1.1 mycroft fpsp.defs \
268 1.1 mycroft l_entry.s \
269 1.1 mycroft l_do_func.s \
270 1.1 mycroft l_round.s \
271 1.1 mycroft l_sacos.s \
272 1.1 mycroft l_sasin.s \
273 1.1 mycroft l_satan.s \
274 1.1 mycroft l_satanh.s \
275 1.1 mycroft l_scale.s \
276 1.1 mycroft l_scosh.s \
277 1.1 mycroft l_setox.s \
278 1.1 mycroft l_sgetem.s \
279 1.1 mycroft l_sint.s \
280 1.1 mycroft l_slog2.s \
281 1.1 mycroft l_slogn.s \
282 1.1 mycroft l_srem_mod.s \
283 1.1 mycroft l_ssin.s \
284 1.1 mycroft l_ssinh.s \
285 1.1 mycroft l_stan.s \
286 1.1 mycroft l_stanh.s \
287 1.1 mycroft l_stwotox.s \
288 1.1 mycroft l_support.s \
289 1.1 mycroft l_fpsp.defs
290 1.1 mycroft
291 1.1 mycroft #
292 1.1 mycroft # Build the target object. The linkfile is created on the fly.
293 1.1 mycroft # Change the SEG directives to suit your system.
294 1.1 mycroft #
295 1.1 mycroft $(TARGET).mx: $(RO_FILES)
296 1.1 mycroft rm -f linkfile
297 1.1 mycroft echo 'IDENT FPSP,2,1,68040 Floating Point Software Package'>linkfile
298 1.1 mycroft echo 'SEG SEG0(G):7 $$00004000' >>linkfile
299 1.1 mycroft echo 'SEG SEG1(G):8 $$000D0000' >>linkfile
300 1.1 mycroft echo 'SEG SEG2(G):15 $$000E0000' >>linkfile
301 1.1 mycroft echo $(RO_FILES) | tr ' ' '\012' | sed 's/^/INPUT /' >>linkfile
302 1.1 mycroft echo 'END' >>linkfile
303 1.1 mycroft $(PLINK) $(PLINKOPTS) <linkfile
304 1.1 mycroft
305 1.1 mycroft #
306 1.1 mycroft # Just about every file needs fpsp.h so:
307 1.1 mycroft #
308 1.1 mycroft $(RO_FILES): fpsp.h
309 1.1 mycroft
310 1.1 mycroft fpsp.defs: fpsp.h
311 1.1 mycroft asm2as fpsp.h >fpsp.defs
312 1.1 mycroft
313 1.1 mycroft unix.s:
314 1.1 mycroft sccs get unix.s
315 1.1 mycroft
316 1.1 mycroft fpsp.mk:
317 1.1 mycroft sccs get fpsp.mk
318 1.1 mycroft
319 1.1 mycroft #
320 1.1 mycroft #-----------------------------------------------------------------------
321 1.1 mycroft #
322 1.1 mycroft # For making a library version of the FPSP:
323 1.1 mycroft #
324 1.1 mycroft library: $(LIB_TARGET)
325 1.1 mycroft
326 1.1 mycroft $(LIB_TARGET): $(LIB_RO_FILES)
327 1.1 mycroft rm -f $(LIB_TARGET)
328 1.1 mycroft $(AR) crv $(LIB_TARGET) $(LIB_RO_FILES)
329 1.1 mycroft
330 1.1 mycroft $(LIB_RO_FILES): l_fpsp.h
331 1.1 mycroft
332 1.1 mycroft l_fpsp.defs: l_fpsp.h
333 1.1 mycroft asm2as l_fpsp.h >l_fpsp.defs
334 1.1 mycroft
335 1.1 mycroft #
336 1.1 mycroft # The entry points to the library version are created here
337 1.1 mycroft # by using two template files an awk script and a list of
338 1.1 mycroft # the entry routines for each function.
339 1.1 mycroft #
340 1.1 mycroft l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h
341 1.1 mycroft awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - <L_LIST|sh>l_entry.sa
342 1.1 mycroft
343 1.1 mycroft #
344 1.1 mycroft # Do_func.sa and round.sa need special editing to remove references that
345 1.1 mycroft # aren't needed in the library version. Beware that changes in
346 1.1 mycroft # the source code may cause this editing to break....
347 1.1 mycroft #
348 1.1 mycroft l_do_func.sa: do_func.sa
349 1.1 mycroft $(LIB_FILTER) do_func.sa >l_do_func.sa
350 1.1 mycroft echo '/xdef.*do_func/,/^ rts/d' >.SCRIPT
351 1.1 mycroft echo 'g/smovcr/d' >>.SCRIPT
352 1.1 mycroft echo 'g/tblpre/d' >>.SCRIPT
353 1.1 mycroft echo 'w' >>.SCRIPT
354 1.1 mycroft echo 'q' >>.SCRIPT
355 1.1 mycroft ed - l_do_func.sa <.SCRIPT
356 1.1 mycroft rm .SCRIPT
357 1.1 mycroft
358 1.1 mycroft l_round.sa: round.sa
359 1.1 mycroft $(LIB_FILTER) round.sa >l_round.sa
360 1.1 mycroft echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT
361 1.1 mycroft echo 'w' >>.SCRIPT
362 1.1 mycroft echo 'q' >>.SCRIPT
363 1.1 mycroft ed - l_round.sa <.SCRIPT
364 1.1 mycroft rm .SCRIPT
365 1.1 mycroft
366 1.1 mycroft l_sacos.sa: sacos.sa
367 1.1 mycroft $(LIB_FILTER) sacos.sa >l_sacos.sa
368 1.1 mycroft
369 1.1 mycroft l_sasin.sa: sasin.sa
370 1.1 mycroft $(LIB_FILTER) sasin.sa >l_sasin.sa
371 1.1 mycroft
372 1.1 mycroft l_satan.sa: satan.sa
373 1.1 mycroft $(LIB_FILTER) satan.sa >l_satan.sa
374 1.1 mycroft
375 1.1 mycroft l_satanh.sa: satanh.sa
376 1.1 mycroft $(LIB_FILTER) satanh.sa >l_satanh.sa
377 1.1 mycroft
378 1.1 mycroft l_scale.sa: scale.sa
379 1.1 mycroft $(LIB_FILTER) scale.sa >l_scale.sa
380 1.1 mycroft
381 1.1 mycroft l_scosh.sa: scosh.sa
382 1.1 mycroft $(LIB_FILTER) scosh.sa >l_scosh.sa
383 1.1 mycroft
384 1.1 mycroft l_setox.sa: setox.sa
385 1.1 mycroft $(LIB_FILTER) setox.sa >l_setox.sa
386 1.1 mycroft
387 1.1 mycroft l_sgetem.sa: sgetem.sa
388 1.1 mycroft $(LIB_FILTER) sgetem.sa >l_sgetem.sa
389 1.1 mycroft
390 1.1 mycroft l_sint.sa: sint.sa
391 1.1 mycroft $(LIB_FILTER) sint.sa >l_sint.sa
392 1.1 mycroft
393 1.1 mycroft l_slog2.sa: slog2.sa
394 1.1 mycroft $(LIB_FILTER) slog2.sa >l_slog2.sa
395 1.1 mycroft
396 1.1 mycroft l_slogn.sa: slogn.sa
397 1.1 mycroft $(LIB_FILTER) slogn.sa >l_slogn.sa
398 1.1 mycroft
399 1.1 mycroft l_srem_mod.sa: srem_mod.sa
400 1.1 mycroft $(LIB_FILTER) srem_mod.sa >l_srem_mod.sa
401 1.1 mycroft
402 1.1 mycroft l_ssin.sa: ssin.sa
403 1.1 mycroft $(LIB_FILTER) ssin.sa >l_ssin.sa
404 1.1 mycroft
405 1.1 mycroft l_ssinh.sa: ssinh.sa
406 1.1 mycroft $(LIB_FILTER) ssinh.sa >l_ssinh.sa
407 1.1 mycroft
408 1.1 mycroft l_stan.sa: stan.sa
409 1.1 mycroft $(LIB_FILTER) stan.sa >l_stan.sa
410 1.1 mycroft
411 1.1 mycroft l_stanh.sa: stanh.sa
412 1.1 mycroft $(LIB_FILTER) stanh.sa >l_stanh.sa
413 1.1 mycroft
414 1.1 mycroft l_stwotox.sa: stwotox.sa
415 1.1 mycroft $(LIB_FILTER) stwotox.sa >l_stwotox.sa
416 1.1 mycroft
417 1.1 mycroft #
418 1.1 mycroft # Extract all files from SCCS directory
419 1.1 mycroft #
420 1.1 mycroft getall: $(SA_FILES) $(H_FILES)
421 1.1 mycroft
422 1.1 mycroft convert: $(U_FILES)
423 1.1 mycroft
424 1.1 mycroft clean:
425 1.1 mycroft rm -f $(RO_FILES)
426 1.1 mycroft rm -f $(U_FILES)
427 1.1 mycroft rm -f *.ls linkfile $(TARGET).linkmap
428 1.1 mycroft rm -f FPSP.mx
429 1.1 mycroft rm -f $(LIB_TARGET) .SCRIPT
430 1.1 mycroft rm -f $(LIB_RO_FILES)
431 1.1 mycroft rm -f $(LIB_SA_FILES)
432 1.1 mycroft
433 1.1 mycroft clobber: clean
434 1.1 mycroft
435