1 # $NetBSD: Makefile,v 1.17 2008/10/25 22:27:37 apb Exp $
3 # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
4 # M68000 Hi-Performance Microprocessor Division
5 # M68040 Software Package
7 # M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
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.
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.
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.
34 # Makefile 3.3 3/27/91
36 # Makefile for 68040 Floating Point Software Package
39 .
include <bsd.prog.mk
>
43 CPPFLAGS
= ${FPSPCPPFLAGS} ${FPSPMISCCPPFLAGS}
44 .SUFFIXES
: .o .s .sa .defs .h
52 AFLAGS
= -x assembler-with-cpp
-m68040
55 # For the Library Version:
58 LIB_FILTER
= ${TOOL_SED} 's/fpsp.defs/l_fpsp.defs/'
59 LIB_TARGET
= lib
$(TARGET
).a
61 # SYS selects the template set to use
62 # templates are supplied for R3V6, CI5 and GEN(generic)
63 # PREFIX is a string that begins a temporary label in the assembler
64 # R3V6 uses 'L%', CI5 likes '.L'
79 SED
=${TOOL_SED
:Q
} ${HOST_SH} ${FPSPDIR}/asm2gas
${.IMPSRC
} >${.TARGET
}
81 SED
=${TOOL_SED
:Q
} ${HOST_SH} ${FPSPDIR}/asm2gas
${.IMPSRC
} >${.TARGET
}
83 ${CC} ${AFLAGS} ${CPPFLAGS} -c
-o
${.TARGET
} ${.IMPSRC
}
201 l_entry.sa l_entry.s \
224 # Build the target object. The linkfile is created on the fly.
225 # Change the SEG directives to suit your system.
227 $(TARGET
).o
: $(O_FILES
)
228 $(LD
) -r
-o
$(TARGET
).o
$(O_FILES
)
231 # Just about every file needs fpsp.h so:
233 $(O_FILES
): fpsp.defs
236 #-----------------------------------------------------------------------
238 # For making a library version of the FPSP:
240 library
: $(LIB_TARGET
)
242 $(LIB_TARGET
): $(LIB_O_FILES
)
244 $(AR
) crv
$(LIB_TARGET
) $(LIB_O_FILES
)
246 $(LIB_O_FILES
): l_fpsp.defs
249 # The entry points to the library version are created here
250 # by using two template files an awk script and a list of
251 # the entry routines for each function.
253 l_entry.sa
: L_ENTRY.AWK L_LIST MONADIC.
$(SYS
) DYADIC.
$(SYS
) l_fpsp.h
254 ${TOOL_AWK} -f L_ENTRY.AWK SYS
=$(SYS
) PREFIX
=$(PREFIX
) - \
255 <L_LIST |
${HOST_SH} >l_entry.sa
258 # Do_func.sa and round.sa need special editing to remove references that
259 # aren't needed in the library version. Beware that changes in
260 # the source code may cause this editing to break....
262 l_do_func.s
: do_func.s
263 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
264 echo
'/global.*do_func/,/^ rts/d' >.SCRIPT
265 echo
'g/smovcr/d' >>.SCRIPT
266 echo
'g/tblpre/d' >>.SCRIPT
269 ed
- ${.TARGET
} <.SCRIPT
273 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
274 echo
'/^not_E3:/-6,/^not_E3:/d' >.SCRIPT
277 ed
- ${.TARGET
} <.SCRIPT
280 l_copyright.s
: copyright.s
281 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
284 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
287 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
290 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
293 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
296 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
299 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
302 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
305 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
308 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
311 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
314 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
316 l_srem_mod.s
: srem_mod.s
317 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
320 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
323 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
326 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
329 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
331 l_stwotox.s
: stwotox.s
332 $(LIB_FILTER
) ${.ALLSRC
} >${.TARGET
}
335 # Extract all files from SCCS directory