11.17Sapb# $NetBSD: Makefile,v 1.17 2008/10/25 22:27:37 apb Exp $ 21.4Scgd 31.1Smycroft# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP 41.1Smycroft# M68000 Hi-Performance Microprocessor Division 51.1Smycroft# M68040 Software Package 61.1Smycroft# 71.1Smycroft# M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc. 81.1Smycroft# All rights reserved. 91.1Smycroft# 101.1Smycroft# THE SOFTWARE is provided on an "AS IS" basis and without warranty. 111.1Smycroft# To the maximum extent permitted by applicable law, 121.1Smycroft# MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, 131.1Smycroft# INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 141.1Smycroft# PARTICULAR PURPOSE and any warranty against infringement with 151.1Smycroft# regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) 161.1Smycroft# and any accompanying written materials. 171.1Smycroft# 181.1Smycroft# To the maximum extent permitted by applicable law, 191.1Smycroft# IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER 201.1Smycroft# (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS 211.1Smycroft# PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR 221.1Smycroft# OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE 231.1Smycroft# SOFTWARE. Motorola assumes no responsibility for the maintenance 241.1Smycroft# and support of the SOFTWARE. 251.1Smycroft# 261.1Smycroft# You are hereby granted a copyright license to use, modify, and 271.1Smycroft# distribute the SOFTWARE so long as this entire notice is retained 281.1Smycroft# without alteration in any modified and/or redistributed versions, 291.1Smycroft# and that such modified versions are clearly identified as such. 301.1Smycroft# No licenses are granted by implication, estoppel or otherwise 311.1Smycroft# under any patents or trademarks of Motorola, Inc. 321.1Smycroft 331.1Smycroft# 341.1Smycroft# Makefile 3.3 3/27/91 351.1Smycroft# 361.1Smycroft# Makefile for 68040 Floating Point Software Package 371.1Smycroft# 381.1Smycroft 391.14Sgdamore.include <bsd.prog.mk> 401.11Slukem 411.2SmycroftTARGET = fpsp 421.1Smycroft 431.9StsutsuiCPPFLAGS= ${FPSPCPPFLAGS} ${FPSPMISCCPPFLAGS} 441.8Schs.SUFFIXES: .o .s .sa .defs .h 451.8Schs 461.8Schs.PATH.h: ${FPSPDIR} 471.8Schs.PATH.s: ${FPSPDIR} 481.8Schs.PATH.sa: ${FPSPDIR} 491.8Schs 501.9StsutsuiAS? = as 511.7SjeremyLD? = ld 521.10SthorpejAFLAGS = -x assembler-with-cpp -m68040 531.1Smycroft 541.1Smycroft# 551.1Smycroft# For the Library Version: 561.1Smycroft# 571.7SjeremyAR? = ar 581.17SapbLIB_FILTER = ${TOOL_SED} 's/fpsp.defs/l_fpsp.defs/' 591.2SmycroftLIB_TARGET = lib$(TARGET).a 601.1Smycroft# 611.1Smycroft# SYS selects the template set to use 621.1Smycroft# templates are supplied for R3V6, CI5 and GEN(generic) 631.1Smycroft# PREFIX is a string that begins a temporary label in the assembler 641.1Smycroft# R3V6 uses 'L%', CI5 likes '.L' 651.1Smycroft# 661.1Smycroft#SYS = R3V6 671.1Smycroft#PREFIX = L%% 681.1Smycroft# 691.1Smycroft#SYS = CI5 701.1Smycroft#PREFIX = .L 711.1Smycroft# 721.2Smycroft#SYS = GEN 731.2Smycroft#PREFIX = L_ 741.2Smycroft# 751.2SmycroftSYS = GCC 761.1SmycroftPREFIX = L_ 771.1Smycroft 781.1Smycroft.sa.s: 791.15Stsutsui SED=${TOOL_SED:Q} ${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET} 801.2Smycroft.h.defs: 811.15Stsutsui SED=${TOOL_SED:Q} ${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET} 821.2Smycroft.s.o: 831.9Stsutsui ${CC} ${AFLAGS} ${CPPFLAGS} -c -o ${.TARGET} ${.IMPSRC} 841.1Smycroft 851.2SmycroftH_FILES = \ 861.2Smycroft fpsp.defs \ 871.2Smycroft l_fpsp.defs 881.1Smycroft 891.2SmycroftO_FILES = \ 901.3Smycroft copyright.o \ 911.2Smycroft netbsd.o \ 921.2Smycroft bindec.o \ 931.2Smycroft binstr.o \ 941.2Smycroft decbin.o \ 951.2Smycroft do_func.o \ 961.2Smycroft gen_except.o \ 971.2Smycroft get_op.o \ 981.2Smycroft kernel_ex.o \ 991.2Smycroft res_func.o \ 1001.2Smycroft round.o \ 1011.2Smycroft sacos.o \ 1021.2Smycroft sasin.o \ 1031.2Smycroft satan.o \ 1041.2Smycroft satanh.o \ 1051.2Smycroft scosh.o \ 1061.2Smycroft setox.o \ 1071.2Smycroft sgetem.o \ 1081.2Smycroft sint.o \ 1091.2Smycroft slogn.o \ 1101.2Smycroft slog2.o \ 1111.2Smycroft smovecr.o \ 1121.2Smycroft srem_mod.o \ 1131.2Smycroft scale.o \ 1141.2Smycroft ssin.o \ 1151.2Smycroft ssinh.o \ 1161.2Smycroft stan.o \ 1171.2Smycroft stanh.o \ 1181.2Smycroft sto_res.o \ 1191.2Smycroft stwotox.o \ 1201.2Smycroft tbldo.o \ 1211.2Smycroft util.o \ 1221.2Smycroft x_bsun.o \ 1231.2Smycroft x_fline.o \ 1241.2Smycroft x_operr.o \ 1251.2Smycroft x_ovfl.o \ 1261.2Smycroft x_snan.o \ 1271.2Smycroft x_store.o \ 1281.2Smycroft x_unfl.o \ 1291.2Smycroft x_unimp.o \ 1301.2Smycroft x_unsupp.o \ 1311.2Smycroft bugfix.o 1321.2Smycroft 1331.2SmycroftLIB_O_FILES = \ 1341.3Smycroft l_copyright.o \ 1351.2Smycroft l_entry.o \ 1361.2Smycroft l_do_func.o \ 1371.2Smycroft l_round.o \ 1381.2Smycroft l_sacos.o \ 1391.2Smycroft l_sasin.o \ 1401.2Smycroft l_satan.o \ 1411.2Smycroft l_satanh.o \ 1421.2Smycroft l_scale.o \ 1431.2Smycroft l_scosh.o \ 1441.2Smycroft l_setox.o \ 1451.2Smycroft l_sgetem.o \ 1461.2Smycroft l_sint.o \ 1471.2Smycroft l_slog2.o \ 1481.2Smycroft l_slogn.o \ 1491.2Smycroft l_srem_mod.o \ 1501.2Smycroft l_ssin.o \ 1511.2Smycroft l_ssinh.o \ 1521.2Smycroft l_stan.o \ 1531.2Smycroft l_stanh.o \ 1541.2Smycroft l_stwotox.o \ 1551.2Smycroft l_support.o 1561.1Smycroft 1571.2SmycroftS_FILES = \ 1581.2Smycroft netbsd.s \ 1591.1Smycroft bindec.s \ 1601.1Smycroft binstr.s \ 1611.1Smycroft decbin.s \ 1621.1Smycroft do_func.s \ 1631.1Smycroft get_op.s \ 1641.1Smycroft gen_except.s \ 1651.1Smycroft kernel_ex.s \ 1661.1Smycroft res_func.s \ 1671.1Smycroft round.s \ 1681.1Smycroft sacos.s \ 1691.1Smycroft sasin.s \ 1701.1Smycroft satan.s \ 1711.1Smycroft satanh.s \ 1721.1Smycroft scosh.s \ 1731.1Smycroft setox.s \ 1741.1Smycroft sgetem.s \ 1751.1Smycroft sint.s \ 1761.1Smycroft slogn.s \ 1771.1Smycroft slog2.s \ 1781.1Smycroft smovecr.s \ 1791.1Smycroft srem_mod.s \ 1801.1Smycroft scale.s \ 1811.1Smycroft ssin.s \ 1821.1Smycroft ssinh.s \ 1831.1Smycroft stan.s \ 1841.1Smycroft stanh.s \ 1851.1Smycroft sto_res.s \ 1861.1Smycroft stwotox.s \ 1871.1Smycroft tbldo.s \ 1881.1Smycroft util.s \ 1891.1Smycroft x_bsun.s \ 1901.1Smycroft x_fline.s \ 1911.1Smycroft x_operr.s \ 1921.1Smycroft x_ovfl.s \ 1931.1Smycroft x_snan.s \ 1941.1Smycroft x_store.s \ 1951.1Smycroft x_unfl.s \ 1961.1Smycroft x_unimp.s \ 1971.1Smycroft x_unsupp.s \ 1981.2Smycroft bugfix.s 1991.2Smycroft 2001.2SmycroftLIB_S_FILES = \ 2011.2Smycroft l_entry.sa l_entry.s \ 2021.1Smycroft l_do_func.s \ 2031.1Smycroft l_round.s \ 2041.1Smycroft l_sacos.s \ 2051.1Smycroft l_sasin.s \ 2061.1Smycroft l_satan.s \ 2071.1Smycroft l_satanh.s \ 2081.1Smycroft l_scale.s \ 2091.1Smycroft l_scosh.s \ 2101.1Smycroft l_setox.s \ 2111.1Smycroft l_sgetem.s \ 2121.1Smycroft l_sint.s \ 2131.1Smycroft l_slog2.s \ 2141.1Smycroft l_slogn.s \ 2151.1Smycroft l_srem_mod.s \ 2161.1Smycroft l_ssin.s \ 2171.1Smycroft l_ssinh.s \ 2181.1Smycroft l_stan.s \ 2191.1Smycroft l_stanh.s \ 2201.1Smycroft l_stwotox.s \ 2211.2Smycroft l_support.s 2221.1Smycroft 2231.1Smycroft# 2241.1Smycroft# Build the target object. The linkfile is created on the fly. 2251.1Smycroft# Change the SEG directives to suit your system. 2261.1Smycroft# 2271.2Smycroft$(TARGET).o: $(O_FILES) 2281.2Smycroft $(LD) -r -o $(TARGET).o $(O_FILES) 2291.1Smycroft 2301.1Smycroft# 2311.1Smycroft# Just about every file needs fpsp.h so: 2321.1Smycroft# 2331.2Smycroft$(O_FILES): fpsp.defs 2341.1Smycroft 2351.1Smycroft# 2361.1Smycroft#----------------------------------------------------------------------- 2371.1Smycroft# 2381.1Smycroft# For making a library version of the FPSP: 2391.1Smycroft# 2401.1Smycroftlibrary: $(LIB_TARGET) 2411.1Smycroft 2421.2Smycroft$(LIB_TARGET): $(LIB_O_FILES) 2431.1Smycroft rm -f $(LIB_TARGET) 2441.2Smycroft $(AR) crv $(LIB_TARGET) $(LIB_O_FILES) 2451.1Smycroft 2461.2Smycroft$(LIB_O_FILES): l_fpsp.defs 2471.1Smycroft 2481.1Smycroft# 2491.1Smycroft# The entry points to the library version are created here 2501.1Smycroft# by using two template files an awk script and a list of 2511.1Smycroft# the entry routines for each function. 2521.1Smycroft# 2531.1Smycroftl_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h 2541.16Sapb ${TOOL_AWK} -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - \ 2551.11Slukem <L_LIST | ${HOST_SH} >l_entry.sa 2561.1Smycroft 2571.1Smycroft# 2581.1Smycroft# Do_func.sa and round.sa need special editing to remove references that 2591.1Smycroft# aren't needed in the library version. Beware that changes in 2601.1Smycroft# the source code may cause this editing to break.... 2611.1Smycroft# 2621.2Smycroftl_do_func.s: do_func.s 2631.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2641.2Smycroft echo '/global.*do_func/,/^ rts/d' >.SCRIPT 2651.1Smycroft echo 'g/smovcr/d' >>.SCRIPT 2661.1Smycroft echo 'g/tblpre/d' >>.SCRIPT 2671.1Smycroft echo 'w' >>.SCRIPT 2681.1Smycroft echo 'q' >>.SCRIPT 2691.3Smycroft ed - ${.TARGET} <.SCRIPT 2701.1Smycroft rm .SCRIPT 2711.1Smycroft 2721.2Smycroftl_round.s: round.s 2731.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2741.1Smycroft echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT 2751.1Smycroft echo 'w' >>.SCRIPT 2761.1Smycroft echo 'q' >>.SCRIPT 2771.3Smycroft ed - ${.TARGET} <.SCRIPT 2781.1Smycroft rm .SCRIPT 2791.1Smycroft 2801.3Smycroftl_copyright.s: copyright.s 2811.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2821.3Smycroft 2831.2Smycroftl_sacos.s: sacos.s 2841.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2851.1Smycroft 2861.2Smycroftl_sasin.s: sasin.s 2871.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2881.1Smycroft 2891.2Smycroftl_satan.s: satan.s 2901.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2911.1Smycroft 2921.2Smycroftl_satanh.s: satanh.s 2931.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2941.1Smycroft 2951.2Smycroftl_scale.s: scale.s 2961.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2971.1Smycroft 2981.2Smycroftl_scosh.s: scosh.s 2991.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3001.1Smycroft 3011.2Smycroftl_setox.s: setox.s 3021.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3031.1Smycroft 3041.2Smycroftl_sgetem.s: sgetem.s 3051.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3061.1Smycroft 3071.2Smycroftl_sint.s: sint.s 3081.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3091.1Smycroft 3101.2Smycroftl_slog2.s: slog2.s 3111.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3121.1Smycroft 3131.2Smycroftl_slogn.s: slogn.s 3141.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3151.1Smycroft 3161.2Smycroftl_srem_mod.s: srem_mod.s 3171.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3181.1Smycroft 3191.2Smycroftl_ssin.s: ssin.s 3201.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3211.1Smycroft 3221.2Smycroftl_ssinh.s: ssinh.s 3231.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3241.1Smycroft 3251.2Smycroftl_stan.s: stan.s 3261.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3271.1Smycroft 3281.2Smycroftl_stanh.s: stanh.s 3291.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3301.1Smycroft 3311.2Smycroftl_stwotox.s: stwotox.s 3321.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3331.1Smycroft 3341.1Smycroft# 3351.1Smycroft# Extract all files from SCCS directory 3361.1Smycroft# 3371.1Smycroftclean: 3381.2Smycroft rm -f $(H_FILES) 3391.2Smycroft rm -f $(S_FILES) 3401.2Smycroft rm -f $(O_FILES) 3411.2Smycroft rm -f $(TARGET).o 3421.2Smycroft rm -f $(LIB_S_FILES) 3431.2Smycroft rm -f $(LIB_O_FILES) 3441.2Smycroft rm -f $(LIB_TARGET) 3451.1Smycroft 3461.1Smycroftclobber: clean 347