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