1 # $NetBSD: Makefile.inc,v 1.15 2007/10/17 19:55:04 garbled Exp $
3 # Configuration variables (default values are below):
5 # S must be set to the top of the 'sys' tree.
6 # FPSPDST may be set to the location of the directory where library
7 # objects are to be built. Defaults to ${.OBJDIR}/lib/kern.
8 # FPSP_AS isn't there. We always build an object file.
10 # Miscellaneous cpp flags to be passed to the library's Makefile
13 # Miscellaneous flags to be passed to the library's Makefile when
14 # building. See library's Makefile for more details about
15 # supported flags and their default values.
18 FPSPDST?= ${.OBJDIR}/lib/fpsp
21 FPSPDIR= ${S:S@^.@${FPSPDOTDIR}@:Q}/arch/m68k/fpsp
22 FPSPOBJ= ${FPSPDST}/fpsp.o
23 HAS_FPSP!= grep '^\#define FPSP 1$$' opt_fpsp.h || echo
28 # CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
29 # AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
30 # LD=${LD:Q} STRIP=${STRIP:Q} \
33 cd ${FPSPDST} && ${MAKE} -f ${FPSPDIR:Q}/Makefile \
34 FPSPDIR=${FPSPDIR:Q} \
35 CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
36 LD=${LD:Q} STRIP=${STRIP:Q} \
38 MACHINE_ARCH=${MACHINE_ARCH:Q} \
39 FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I${FPSPDOTDIR}@g:Q} \
40 FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:Q} \
41 FPSPDIR=${FPSPDIR:Q} \
44 ${FPSP}: .NOTMAIN __always_make_fpsp
45 @echo making sure the 68040 FPSP is up to date...
48 ${FPSPLIB_PROF}: .NOTMAIN __always_make_fpsp
49 @echo making sure the profiled 68040 FPSP is up to date...
52 clean: .NOTMAIN cleanfpsp
53 cleanfpsp: .NOTMAIN __always_make_fpsp
54 @echo cleaning the 68040 FPSP objects
57 cleandir distclean: .NOTMAIN cleandirfpsp
58 cleandirfpsp: .NOTMAIN __always_make_fpsp
59 # So we don't really need a cleandir target without a depend target.
60 # On the other hand, were "make cleandir" in the kernel build
61 # directory to fail to remove all the floating point objects, that
62 # would tend to violate the principle of least surprise!
63 @echo cleandiring the 68040 FPSP objects
66 #depend: .NOTMAIN dependfpsp
67 #dependfpsp: .NOTMAIN __always_make_fpsp
68 # @echo depending the 68040 FPSP objects
72 __always_make_fpsp: .NOTMAIN
73 @(mkdir -p ${FPSPDST})