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