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 FPSP!= grep '^\#define FPSP 1$$' opt_fpsp.h >/dev/null && echo ${FPSPOBJ}
26 # CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
27 # AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
28 # LD=${LD:Q} STRIP=${STRIP:Q} \
31 cd ${FPSPDST} && ${MAKE} -f ${FPSPDIR:Q}/Makefile \
32 FPSPDIR=${FPSPDIR:Q} \
33 CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
34 LD=${LD:Q} STRIP=${STRIP:Q} \
36 MACHINE_ARCH=${MACHINE_ARCH:Q} \
37 FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I${FPSPDOTDIR}@g:Q} \
38 FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:Q} \
39 FPSPDIR=${FPSPDIR:Q} \
42 ${FPSP}: .NOTMAIN __always_make_fpsp
43 @echo making sure the 68040 FPSP is up to date...
46 ${FPSPLIB_PROF}: .NOTMAIN __always_make_fpsp
47 @echo making sure the profiled 68040 FPSP is up to date...
50 clean: .NOTMAIN cleanfpsp
51 cleanfpsp: .NOTMAIN __always_make_fpsp
52 @echo cleaning the 68040 FPSP objects
55 cleandir distclean: .NOTMAIN cleandirfpsp
56 cleandirfpsp: .NOTMAIN __always_make_fpsp
57 # So we don't really need a cleandir target without a depend target.
58 # On the other hand, were "make cleandir" in the kernel build
59 # directory to fail to remove all the floating point objects, that
60 # would tend to violate the principle of least surprise!
61 @echo cleandiring the 68040 FPSP objects
64 #depend: .NOTMAIN dependfpsp
65 #dependfpsp: .NOTMAIN __always_make_fpsp
66 # @echo depending the 68040 FPSP objects
70 __always_make_fpsp: .NOTMAIN
71 @(mkdir -p ${FPSPDST})