summaryrefslogtreecommitdiff
path: root/sys/arch/m68k/fpsp/Makefile
blob: 9e331420628ea8412a69e89709b7aeb04268f7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
#	$OpenBSD: Makefile,v 1.7 1996/05/29 21:05:23 niklas Exp $
#	$NetBSD: Makefile,v 1.4 1994/10/26 07:48:46 cgd Exp $

#	MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
#	M68000 Hi-Performance Microprocessor Division
#	M68040 Software Package 
#
#	M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
#	All rights reserved.
#
#	THE SOFTWARE is provided on an "AS IS" basis and without warranty.
#	To the maximum extent permitted by applicable law,
#	MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
#	INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
#	PARTICULAR PURPOSE and any warranty against infringement with
#	regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
#	and any accompanying written materials. 
#
#	To the maximum extent permitted by applicable law,
#	IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
#	(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS
#	PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR
#	OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE
#	SOFTWARE.  Motorola assumes no responsibility for the maintenance
#	and support of the SOFTWARE.  
#
#	You are hereby granted a copyright license to use, modify, and
#	distribute the SOFTWARE so long as this entire notice is retained
#	without alteration in any modified and/or redistributed versions,
#	and that such modified versions are clearly identified as such.
#	No licenses are granted by implication, estoppel or otherwise
#	under any patents or trademarks of Motorola, Inc.

#
#	Makefile 3.3 3/27/91
#
#	Makefile for 68040 Floating Point Software Package
#

TARGET = fpsp

AS		= as -m68040
LD		= ld

#
# For the Library Version:
#
AR		= ar
LIB_FILTER 	= sed 's/fpsp.defs/l_fpsp.defs/'
LIB_TARGET	= lib$(TARGET).a
#
# SYS selects the template set to use
#	templates are supplied for R3V6, CI5 and GEN(generic)
# PREFIX is a string that begins a temporary label in the assembler
#	R3V6 uses 'L%', CI5 likes '.L'
#
#SYS		= R3V6
#PREFIX		= L%%
#
#SYS		= CI5
#PREFIX		= .L
#
#SYS		= GEN
#PREFIX		= L_
#
SYS		= GCC
PREFIX		= L_

.SUFFIXES:	.o .s .sa .defs .h

.sa.s:
	sh ${.CURDIR}/asm2gas ${.IMPSRC} >${.TARGET}
.h.defs:
	sh ${.CURDIR}/asm2gas ${.IMPSRC} >${.TARGET}
.s.o:
	$(AS) -o ${.TARGET} ${.IMPSRC}

H_FILES = \
	fpsp.defs \
	l_fpsp.defs

O_FILES = \
	copyright.o \
	netbsd.o \
	bindec.o \
	binstr.o \
	decbin.o \
	do_func.o \
	gen_except.o \
	get_op.o \
	kernel_ex.o \
	res_func.o \
	round.o \
	sacos.o \
	sasin.o \
	satan.o \
	satanh.o \
	scosh.o \
	setox.o \
	sgetem.o \
	sint.o \
	slogn.o \
	slog2.o \
	smovecr.o \
	srem_mod.o \
	scale.o \
	ssin.o \
	ssinh.o \
	stan.o \
	stanh.o \
	sto_res.o \
	stwotox.o \
	tbldo.o \
	util.o \
	x_bsun.o \
	x_fline.o \
	x_operr.o \
	x_ovfl.o \
	x_snan.o \
	x_store.o \
	x_unfl.o \
	x_unimp.o \
	x_unsupp.o \
	bugfix.o

LIB_O_FILES	= \
	l_copyright.o \
	l_entry.o \
	l_do_func.o \
	l_round.o \
	l_sacos.o \
	l_sasin.o \
	l_satan.o \
	l_satanh.o \
	l_scale.o \
	l_scosh.o \
	l_setox.o \
	l_sgetem.o \
	l_sint.o \
	l_slog2.o \
	l_slogn.o \
	l_srem_mod.o \
	l_ssin.o \
	l_ssinh.o \
	l_stan.o \
	l_stanh.o \
	l_stwotox.o \
	l_support.o

S_FILES = \
	netbsd.s \
	bindec.s \
	binstr.s \
	decbin.s \
	do_func.s \
	get_op.s \
	gen_except.s \
	kernel_ex.s \
	res_func.s \
	round.s \
	sacos.s \
	sasin.s \
	satan.s \
	satanh.s \
	scosh.s \
	setox.s \
	sgetem.s \
	sint.s \
	slogn.s \
	slog2.s \
	smovecr.s \
	srem_mod.s \
	scale.s \
	ssin.s \
	ssinh.s \
	stan.s \
	stanh.s \
	sto_res.s \
	stwotox.s \
	tbldo.s \
	util.s \
	x_bsun.s \
	x_fline.s \
	x_operr.s \
	x_ovfl.s \
	x_snan.s \
	x_store.s \
	x_unfl.s \
	x_unimp.s \
	x_unsupp.s \
	bugfix.s

LIB_S_FILES	= \
	l_entry.sa l_entry.s \
	l_do_func.s \
	l_round.s \
	l_sacos.s \
	l_sasin.s \
	l_satan.s \
	l_satanh.s \
	l_scale.s \
	l_scosh.s \
	l_setox.s \
	l_sgetem.s \
	l_sint.s \
	l_slog2.s \
	l_slogn.s \
	l_srem_mod.s \
	l_ssin.s \
	l_ssinh.s \
	l_stan.s \
	l_stanh.s \
	l_stwotox.s \
	l_support.s

#
#	Build the target object.  The linkfile is created on the fly.
#	Change the SEG directives to suit your system.
#
$(TARGET).o:	$(O_FILES)
	$(LD) -r -o $(TARGET).o $(O_FILES)

#
#	Just about every file needs fpsp.h so:
#
$(O_FILES):	fpsp.defs

#
#-----------------------------------------------------------------------
#
#	For making a library version of the FPSP:
#
library:	$(LIB_TARGET)

$(LIB_TARGET):	$(LIB_O_FILES)
	rm -f $(LIB_TARGET)
	$(AR) crv $(LIB_TARGET) $(LIB_O_FILES)

$(LIB_O_FILES): l_fpsp.defs

#
# The entry points to the library version are created here
# by using two template files an awk script and a list of
# the entry routines for each function.
#
l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h
	awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - <L_LIST|sh>l_entry.sa

#
# Do_func.sa and round.sa need special editing to remove references that
# aren't needed in the library version.  Beware that changes in
# the source code may cause this editing to break....
#
l_do_func.s: do_func.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
	echo '/global.*do_func/,/^	rts/d' >.SCRIPT
	echo 'g/smovcr/d' >>.SCRIPT
	echo 'g/tblpre/d' >>.SCRIPT
	echo 'w' >>.SCRIPT
	echo 'q' >>.SCRIPT
	ed - ${.TARGET} <.SCRIPT
	rm .SCRIPT

l_round.s: round.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
	echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT
	echo 'w' >>.SCRIPT
	echo 'q' >>.SCRIPT
	ed - ${.TARGET} <.SCRIPT
	rm .SCRIPT

l_copyright.s: copyright.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_sacos.s: sacos.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_sasin.s: sasin.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_satan.s: satan.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_satanh.s: satanh.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_scale.s: scale.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_scosh.s: scosh.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_setox.s: setox.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_sgetem.s: sgetem.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_sint.s: sint.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_slog2.s: slog2.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_slogn.s: slogn.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_srem_mod.s: srem_mod.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_ssin.s: ssin.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_ssinh.s: ssinh.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_stan.s: stan.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_stanh.s: stanh.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

l_stwotox.s: stwotox.s 
	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}

#
#	Extract all files from SCCS directory
#
clean cleandir:
	rm -f $(H_FILES)
	rm -f $(S_FILES)
	rm -f $(O_FILES)
	rm -f $(TARGET).o
	rm -f $(LIB_S_FILES)
	rm -f $(LIB_O_FILES)
	rm -f $(LIB_TARGET)

_SUBDIRUSE:

all:

depend:

install:

.include <bsd.obj.mk>
.include <bsd.own.mk>