# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
# M68000 Hi-Performance Microprocessor Division
# M68040 Software Package
#
# M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
# All rights reserved.
#
# THE SOFTWARE is provided on an "AS IS" basis and without warranty.
# To the maximum extent permitted by applicable law,
# MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
# INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
# PARTICULAR PURPOSE and any warranty against infringement with
# regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
# and any accompanying written materials.
#
# To the maximum extent permitted by applicable law,
# IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
# (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS
# PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR
# OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE
# SOFTWARE. Motorola assumes no responsibility for the maintenance
# and support of the SOFTWARE.
#
# You are hereby granted a copyright license to use, modify, and
# distribute the SOFTWARE so long as this entire notice is retained
# without alteration in any modified and/or redistributed versions,
# and that such modified versions are clearly identified as such.
# No licenses are granted by implication, estoppel or otherwise
# under any patents or trademarks of Motorola, Inc.
#
# Makefile 3.3 3/27/91
#
# Makefile for 68040 Floating Point Software Package
#
#
# For the Library Version:
#
AR? = ar
LIB_FILTER = ${TOOL_SED} 's/fpsp.defs/l_fpsp.defs/'
LIB_TARGET = lib$(TARGET).a
#
# SYS selects the template set to use
# templates are supplied for R3V6, CI5 and GEN(generic)
# PREFIX is a string that begins a temporary label in the assembler
# R3V6 uses 'L%', CI5 likes '.L'
#
#SYS = R3V6
#PREFIX = L%%
#
#SYS = CI5
#PREFIX = .L
#
#SYS = GEN
#PREFIX = L_
#
SYS = GCC
PREFIX = L_
#
# Build the target object. The linkfile is created on the fly.
# Change the SEG directives to suit your system.
#
$(TARGET).o: $(O_FILES)
$(LD) -r -o $(TARGET).o $(O_FILES)
#
# Just about every file needs fpsp.h so:
#
$(O_FILES): fpsp.defs
#
#-----------------------------------------------------------------------
#
# For making a library version of the FPSP:
#
library: $(LIB_TARGET)
#
# The entry points to the library version are created here
# by using two template files an awk script and a list of
# the entry routines for each function.
#
l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h
${TOOL_AWK} -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - \
<L_LIST | ${HOST_SH} >l_entry.sa
#
# Do_func.sa and round.sa need special editing to remove references that
# aren't needed in the library version. Beware that changes in
# the source code may cause this editing to break....
#
l_do_func.s: do_func.s
$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
echo '/global.*do_func/,/^ rts/d' >.SCRIPT
echo 'g/smovcr/d' >>.SCRIPT
echo 'g/tblpre/d' >>.SCRIPT
echo 'w' >>.SCRIPT
echo 'q' >>.SCRIPT
ed - ${.TARGET} <.SCRIPT
rm .SCRIPT