Makefile revision 1.2
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 37TARGET = fpsp 38 39AS = as -m68040 40LD = ld 41 42# 43# For the Library Version: 44# 45AR = ar 46LIB_FILTER = sed 's/fpsp.defs/l_fpsp.defs/' 47LIB_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# 63SYS = GCC 64PREFIX = L_ 65 66.SUFFIXES: .o .s .sa .defs .h 67 68.sa.s: 69 sh ${.CURDIR}/asm2gas ${.CURDIR}/$*.sa >$*.s 70.h.defs: 71 sh ${.CURDIR}/asm2gas ${.CURDIR}/$*.h >$*.defs 72.s.o: 73 $(AS) -o $*.o $*.s 74 75H_FILES = \ 76 fpsp.defs \ 77 l_fpsp.defs 78 79O_FILES = \ 80 netbsd.o \ 81 bindec.o \ 82 binstr.o \ 83 decbin.o \ 84 do_func.o \ 85 gen_except.o \ 86 get_op.o \ 87 kernel_ex.o \ 88 res_func.o \ 89 round.o \ 90 sacos.o \ 91 sasin.o \ 92 satan.o \ 93 satanh.o \ 94 scosh.o \ 95 setox.o \ 96 sgetem.o \ 97 sint.o \ 98 slogn.o \ 99 slog2.o \ 100 smovecr.o \ 101 srem_mod.o \ 102 scale.o \ 103 ssin.o \ 104 ssinh.o \ 105 stan.o \ 106 stanh.o \ 107 sto_res.o \ 108 stwotox.o \ 109 tbldo.o \ 110 util.o \ 111 x_bsun.o \ 112 x_fline.o \ 113 x_operr.o \ 114 x_ovfl.o \ 115 x_snan.o \ 116 x_store.o \ 117 x_unfl.o \ 118 x_unimp.o \ 119 x_unsupp.o \ 120 bugfix.o 121 122LIB_O_FILES = \ 123 l_entry.o \ 124 l_do_func.o \ 125 l_round.o \ 126 l_sacos.o \ 127 l_sasin.o \ 128 l_satan.o \ 129 l_satanh.o \ 130 l_scale.o \ 131 l_scosh.o \ 132 l_setox.o \ 133 l_sgetem.o \ 134 l_sint.o \ 135 l_slog2.o \ 136 l_slogn.o \ 137 l_srem_mod.o \ 138 l_ssin.o \ 139 l_ssinh.o \ 140 l_stan.o \ 141 l_stanh.o \ 142 l_stwotox.o \ 143 l_support.o 144 145S_FILES = \ 146 netbsd.s \ 147 bindec.s \ 148 binstr.s \ 149 decbin.s \ 150 do_func.s \ 151 get_op.s \ 152 gen_except.s \ 153 kernel_ex.s \ 154 res_func.s \ 155 round.s \ 156 sacos.s \ 157 sasin.s \ 158 satan.s \ 159 satanh.s \ 160 scosh.s \ 161 setox.s \ 162 sgetem.s \ 163 sint.s \ 164 slogn.s \ 165 slog2.s \ 166 smovecr.s \ 167 srem_mod.s \ 168 scale.s \ 169 ssin.s \ 170 ssinh.s \ 171 stan.s \ 172 stanh.s \ 173 sto_res.s \ 174 stwotox.s \ 175 tbldo.s \ 176 util.s \ 177 x_bsun.s \ 178 x_fline.s \ 179 x_operr.s \ 180 x_ovfl.s \ 181 x_snan.s \ 182 x_store.s \ 183 x_unfl.s \ 184 x_unimp.s \ 185 x_unsupp.s \ 186 bugfix.s 187 188LIB_S_FILES = \ 189 l_entry.sa l_entry.s \ 190 l_do_func.s \ 191 l_round.s \ 192 l_sacos.s \ 193 l_sasin.s \ 194 l_satan.s \ 195 l_satanh.s \ 196 l_scale.s \ 197 l_scosh.s \ 198 l_setox.s \ 199 l_sgetem.s \ 200 l_sint.s \ 201 l_slog2.s \ 202 l_slogn.s \ 203 l_srem_mod.s \ 204 l_ssin.s \ 205 l_ssinh.s \ 206 l_stan.s \ 207 l_stanh.s \ 208 l_stwotox.s \ 209 l_support.s 210 211# 212# Build the target object. The linkfile is created on the fly. 213# Change the SEG directives to suit your system. 214# 215$(TARGET).o: $(O_FILES) 216 $(LD) -r -o $(TARGET).o $(O_FILES) 217 218# 219# Just about every file needs fpsp.h so: 220# 221$(O_FILES): fpsp.defs 222 223# 224#----------------------------------------------------------------------- 225# 226# For making a library version of the FPSP: 227# 228library: $(LIB_TARGET) 229 230$(LIB_TARGET): $(LIB_O_FILES) 231 rm -f $(LIB_TARGET) 232 $(AR) crv $(LIB_TARGET) $(LIB_O_FILES) 233 234$(LIB_O_FILES): l_fpsp.defs 235 236# 237# The entry points to the library version are created here 238# by using two template files an awk script and a list of 239# the entry routines for each function. 240# 241l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h 242 awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - <L_LIST|sh>l_entry.sa 243 244# 245# Do_func.sa and round.sa need special editing to remove references that 246# aren't needed in the library version. Beware that changes in 247# the source code may cause this editing to break.... 248# 249l_do_func.s: do_func.s 250 $(LIB_FILTER) do_func.s >l_do_func.s 251 echo '/global.*do_func/,/^ rts/d' >.SCRIPT 252 echo 'g/smovcr/d' >>.SCRIPT 253 echo 'g/tblpre/d' >>.SCRIPT 254 echo 'w' >>.SCRIPT 255 echo 'q' >>.SCRIPT 256 ed - l_do_func.s <.SCRIPT 257 rm .SCRIPT 258 259l_round.s: round.s 260 $(LIB_FILTER) round.s >l_round.s 261 echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT 262 echo 'w' >>.SCRIPT 263 echo 'q' >>.SCRIPT 264 ed - l_round.s <.SCRIPT 265 rm .SCRIPT 266 267l_sacos.s: sacos.s 268 $(LIB_FILTER) sacos.s >l_sacos.s 269 270l_sasin.s: sasin.s 271 $(LIB_FILTER) sasin.s >l_sasin.s 272 273l_satan.s: satan.s 274 $(LIB_FILTER) satan.s >l_satan.s 275 276l_satanh.s: satanh.s 277 $(LIB_FILTER) satanh.s >l_satanh.s 278 279l_scale.s: scale.s 280 $(LIB_FILTER) scale.s >l_scale.s 281 282l_scosh.s: scosh.s 283 $(LIB_FILTER) scosh.s >l_scosh.s 284 285l_setox.s: setox.s 286 $(LIB_FILTER) setox.s >l_setox.s 287 288l_sgetem.s: sgetem.s 289 $(LIB_FILTER) sgetem.s >l_sgetem.s 290 291l_sint.s: sint.s 292 $(LIB_FILTER) sint.s >l_sint.s 293 294l_slog2.s: slog2.s 295 $(LIB_FILTER) slog2.s >l_slog2.s 296 297l_slogn.s: slogn.s 298 $(LIB_FILTER) slogn.s >l_slogn.s 299 300l_srem_mod.s: srem_mod.s 301 $(LIB_FILTER) srem_mod.s >l_srem_mod.s 302 303l_ssin.s: ssin.s 304 $(LIB_FILTER) ssin.s >l_ssin.s 305 306l_ssinh.s: ssinh.s 307 $(LIB_FILTER) ssinh.s >l_ssinh.s 308 309l_stan.s: stan.s 310 $(LIB_FILTER) stan.s >l_stan.s 311 312l_stanh.s: stanh.s 313 $(LIB_FILTER) stanh.s >l_stanh.s 314 315l_stwotox.s: stwotox.s 316 $(LIB_FILTER) stwotox.s >l_stwotox.s 317 318# 319# Extract all files from SCCS directory 320# 321clean: 322 rm -f $(H_FILES) 323 rm -f $(S_FILES) 324 rm -f $(O_FILES) 325 rm -f $(TARGET).o 326 rm -f $(LIB_S_FILES) 327 rm -f $(LIB_O_FILES) 328 rm -f $(LIB_TARGET) 329 330clobber: clean 331 332