Makefile revision 1.7
11.7Sjeremy# $NetBSD: Makefile,v 1.7 1997/09/18 22:55:56 jeremy 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.2SmycroftTARGET = fpsp 401.1Smycroft 411.7SjeremyAS = ${CC} -x assembler-with-cpp -traditional-cpp -c -m68040 -I${.CURDIR} 421.7SjeremyLD? = ld 431.1Smycroft 441.1Smycroft# 451.1Smycroft# For the Library Version: 461.1Smycroft# 471.7SjeremyAR? = ar 481.2SmycroftLIB_FILTER = sed 's/fpsp.defs/l_fpsp.defs/' 491.2SmycroftLIB_TARGET = lib$(TARGET).a 501.1Smycroft# 511.1Smycroft# SYS selects the template set to use 521.1Smycroft# templates are supplied for R3V6, CI5 and GEN(generic) 531.1Smycroft# PREFIX is a string that begins a temporary label in the assembler 541.1Smycroft# R3V6 uses 'L%', CI5 likes '.L' 551.1Smycroft# 561.1Smycroft#SYS = R3V6 571.1Smycroft#PREFIX = L%% 581.1Smycroft# 591.1Smycroft#SYS = CI5 601.1Smycroft#PREFIX = .L 611.1Smycroft# 621.2Smycroft#SYS = GEN 631.2Smycroft#PREFIX = L_ 641.2Smycroft# 651.2SmycroftSYS = GCC 661.1SmycroftPREFIX = L_ 671.1Smycroft 681.2Smycroft.SUFFIXES: .o .s .sa .defs .h 691.1Smycroft 701.1Smycroft.sa.s: 711.3Smycroft sh ${.CURDIR}/asm2gas ${.IMPSRC} >${.TARGET} 721.2Smycroft.h.defs: 731.3Smycroft sh ${.CURDIR}/asm2gas ${.IMPSRC} >${.TARGET} 741.2Smycroft.s.o: 751.3Smycroft $(AS) -o ${.TARGET} ${.IMPSRC} 761.1Smycroft 771.2SmycroftH_FILES = \ 781.2Smycroft fpsp.defs \ 791.2Smycroft l_fpsp.defs 801.1Smycroft 811.2SmycroftO_FILES = \ 821.3Smycroft copyright.o \ 831.2Smycroft netbsd.o \ 841.2Smycroft bindec.o \ 851.2Smycroft binstr.o \ 861.2Smycroft decbin.o \ 871.2Smycroft do_func.o \ 881.2Smycroft gen_except.o \ 891.2Smycroft get_op.o \ 901.2Smycroft kernel_ex.o \ 911.2Smycroft res_func.o \ 921.2Smycroft round.o \ 931.2Smycroft sacos.o \ 941.2Smycroft sasin.o \ 951.2Smycroft satan.o \ 961.2Smycroft satanh.o \ 971.2Smycroft scosh.o \ 981.2Smycroft setox.o \ 991.2Smycroft sgetem.o \ 1001.2Smycroft sint.o \ 1011.2Smycroft slogn.o \ 1021.2Smycroft slog2.o \ 1031.2Smycroft smovecr.o \ 1041.2Smycroft srem_mod.o \ 1051.2Smycroft scale.o \ 1061.2Smycroft ssin.o \ 1071.2Smycroft ssinh.o \ 1081.2Smycroft stan.o \ 1091.2Smycroft stanh.o \ 1101.2Smycroft sto_res.o \ 1111.2Smycroft stwotox.o \ 1121.2Smycroft tbldo.o \ 1131.2Smycroft util.o \ 1141.2Smycroft x_bsun.o \ 1151.2Smycroft x_fline.o \ 1161.2Smycroft x_operr.o \ 1171.2Smycroft x_ovfl.o \ 1181.2Smycroft x_snan.o \ 1191.2Smycroft x_store.o \ 1201.2Smycroft x_unfl.o \ 1211.2Smycroft x_unimp.o \ 1221.2Smycroft x_unsupp.o \ 1231.2Smycroft bugfix.o 1241.2Smycroft 1251.2SmycroftLIB_O_FILES = \ 1261.3Smycroft l_copyright.o \ 1271.2Smycroft l_entry.o \ 1281.2Smycroft l_do_func.o \ 1291.2Smycroft l_round.o \ 1301.2Smycroft l_sacos.o \ 1311.2Smycroft l_sasin.o \ 1321.2Smycroft l_satan.o \ 1331.2Smycroft l_satanh.o \ 1341.2Smycroft l_scale.o \ 1351.2Smycroft l_scosh.o \ 1361.2Smycroft l_setox.o \ 1371.2Smycroft l_sgetem.o \ 1381.2Smycroft l_sint.o \ 1391.2Smycroft l_slog2.o \ 1401.2Smycroft l_slogn.o \ 1411.2Smycroft l_srem_mod.o \ 1421.2Smycroft l_ssin.o \ 1431.2Smycroft l_ssinh.o \ 1441.2Smycroft l_stan.o \ 1451.2Smycroft l_stanh.o \ 1461.2Smycroft l_stwotox.o \ 1471.2Smycroft l_support.o 1481.1Smycroft 1491.2SmycroftS_FILES = \ 1501.2Smycroft netbsd.s \ 1511.1Smycroft bindec.s \ 1521.1Smycroft binstr.s \ 1531.1Smycroft decbin.s \ 1541.1Smycroft do_func.s \ 1551.1Smycroft get_op.s \ 1561.1Smycroft gen_except.s \ 1571.1Smycroft kernel_ex.s \ 1581.1Smycroft res_func.s \ 1591.1Smycroft round.s \ 1601.1Smycroft sacos.s \ 1611.1Smycroft sasin.s \ 1621.1Smycroft satan.s \ 1631.1Smycroft satanh.s \ 1641.1Smycroft scosh.s \ 1651.1Smycroft setox.s \ 1661.1Smycroft sgetem.s \ 1671.1Smycroft sint.s \ 1681.1Smycroft slogn.s \ 1691.1Smycroft slog2.s \ 1701.1Smycroft smovecr.s \ 1711.1Smycroft srem_mod.s \ 1721.1Smycroft scale.s \ 1731.1Smycroft ssin.s \ 1741.1Smycroft ssinh.s \ 1751.1Smycroft stan.s \ 1761.1Smycroft stanh.s \ 1771.1Smycroft sto_res.s \ 1781.1Smycroft stwotox.s \ 1791.1Smycroft tbldo.s \ 1801.1Smycroft util.s \ 1811.1Smycroft x_bsun.s \ 1821.1Smycroft x_fline.s \ 1831.1Smycroft x_operr.s \ 1841.1Smycroft x_ovfl.s \ 1851.1Smycroft x_snan.s \ 1861.1Smycroft x_store.s \ 1871.1Smycroft x_unfl.s \ 1881.1Smycroft x_unimp.s \ 1891.1Smycroft x_unsupp.s \ 1901.2Smycroft bugfix.s 1911.2Smycroft 1921.2SmycroftLIB_S_FILES = \ 1931.2Smycroft l_entry.sa l_entry.s \ 1941.1Smycroft l_do_func.s \ 1951.1Smycroft l_round.s \ 1961.1Smycroft l_sacos.s \ 1971.1Smycroft l_sasin.s \ 1981.1Smycroft l_satan.s \ 1991.1Smycroft l_satanh.s \ 2001.1Smycroft l_scale.s \ 2011.1Smycroft l_scosh.s \ 2021.1Smycroft l_setox.s \ 2031.1Smycroft l_sgetem.s \ 2041.1Smycroft l_sint.s \ 2051.1Smycroft l_slog2.s \ 2061.1Smycroft l_slogn.s \ 2071.1Smycroft l_srem_mod.s \ 2081.1Smycroft l_ssin.s \ 2091.1Smycroft l_ssinh.s \ 2101.1Smycroft l_stan.s \ 2111.1Smycroft l_stanh.s \ 2121.1Smycroft l_stwotox.s \ 2131.2Smycroft l_support.s 2141.1Smycroft 2151.1Smycroft# 2161.1Smycroft# Build the target object. The linkfile is created on the fly. 2171.1Smycroft# Change the SEG directives to suit your system. 2181.1Smycroft# 2191.2Smycroft$(TARGET).o: $(O_FILES) 2201.2Smycroft $(LD) -r -o $(TARGET).o $(O_FILES) 2211.1Smycroft 2221.1Smycroft# 2231.1Smycroft# Just about every file needs fpsp.h so: 2241.1Smycroft# 2251.2Smycroft$(O_FILES): fpsp.defs 2261.1Smycroft 2271.1Smycroft# 2281.1Smycroft#----------------------------------------------------------------------- 2291.1Smycroft# 2301.1Smycroft# For making a library version of the FPSP: 2311.1Smycroft# 2321.1Smycroftlibrary: $(LIB_TARGET) 2331.1Smycroft 2341.2Smycroft$(LIB_TARGET): $(LIB_O_FILES) 2351.1Smycroft rm -f $(LIB_TARGET) 2361.2Smycroft $(AR) crv $(LIB_TARGET) $(LIB_O_FILES) 2371.1Smycroft 2381.2Smycroft$(LIB_O_FILES): l_fpsp.defs 2391.1Smycroft 2401.1Smycroft# 2411.1Smycroft# The entry points to the library version are created here 2421.1Smycroft# by using two template files an awk script and a list of 2431.1Smycroft# the entry routines for each function. 2441.1Smycroft# 2451.1Smycroftl_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h 2461.1Smycroft awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - <L_LIST|sh>l_entry.sa 2471.1Smycroft 2481.1Smycroft# 2491.1Smycroft# Do_func.sa and round.sa need special editing to remove references that 2501.1Smycroft# aren't needed in the library version. Beware that changes in 2511.1Smycroft# the source code may cause this editing to break.... 2521.1Smycroft# 2531.2Smycroftl_do_func.s: do_func.s 2541.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2551.2Smycroft echo '/global.*do_func/,/^ rts/d' >.SCRIPT 2561.1Smycroft echo 'g/smovcr/d' >>.SCRIPT 2571.1Smycroft echo 'g/tblpre/d' >>.SCRIPT 2581.1Smycroft echo 'w' >>.SCRIPT 2591.1Smycroft echo 'q' >>.SCRIPT 2601.3Smycroft ed - ${.TARGET} <.SCRIPT 2611.1Smycroft rm .SCRIPT 2621.1Smycroft 2631.2Smycroftl_round.s: round.s 2641.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2651.1Smycroft echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT 2661.1Smycroft echo 'w' >>.SCRIPT 2671.1Smycroft echo 'q' >>.SCRIPT 2681.3Smycroft ed - ${.TARGET} <.SCRIPT 2691.1Smycroft rm .SCRIPT 2701.1Smycroft 2711.3Smycroftl_copyright.s: copyright.s 2721.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2731.3Smycroft 2741.2Smycroftl_sacos.s: sacos.s 2751.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2761.1Smycroft 2771.2Smycroftl_sasin.s: sasin.s 2781.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2791.1Smycroft 2801.2Smycroftl_satan.s: satan.s 2811.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2821.1Smycroft 2831.2Smycroftl_satanh.s: satanh.s 2841.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2851.1Smycroft 2861.2Smycroftl_scale.s: scale.s 2871.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2881.1Smycroft 2891.2Smycroftl_scosh.s: scosh.s 2901.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2911.1Smycroft 2921.2Smycroftl_setox.s: setox.s 2931.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2941.1Smycroft 2951.2Smycroftl_sgetem.s: sgetem.s 2961.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 2971.1Smycroft 2981.2Smycroftl_sint.s: sint.s 2991.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3001.1Smycroft 3011.2Smycroftl_slog2.s: slog2.s 3021.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3031.1Smycroft 3041.2Smycroftl_slogn.s: slogn.s 3051.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3061.1Smycroft 3071.2Smycroftl_srem_mod.s: srem_mod.s 3081.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3091.1Smycroft 3101.2Smycroftl_ssin.s: ssin.s 3111.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3121.1Smycroft 3131.2Smycroftl_ssinh.s: ssinh.s 3141.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3151.1Smycroft 3161.2Smycroftl_stan.s: stan.s 3171.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3181.1Smycroft 3191.2Smycroftl_stanh.s: stanh.s 3201.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3211.1Smycroft 3221.2Smycroftl_stwotox.s: stwotox.s 3231.3Smycroft $(LIB_FILTER) ${.ALLSRC} >${.TARGET} 3241.1Smycroft 3251.1Smycroft# 3261.1Smycroft# Extract all files from SCCS directory 3271.1Smycroft# 3281.1Smycroftclean: 3291.2Smycroft rm -f $(H_FILES) 3301.2Smycroft rm -f $(S_FILES) 3311.2Smycroft rm -f $(O_FILES) 3321.2Smycroft rm -f $(TARGET).o 3331.2Smycroft rm -f $(LIB_S_FILES) 3341.2Smycroft rm -f $(LIB_O_FILES) 3351.2Smycroft rm -f $(LIB_TARGET) 3361.1Smycroft 3371.1Smycroftclobber: clean 3381.1Smycroft 339