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