1 # $NetBSD: Makefile.inc,v 1.12 2001/10/02 06:34:52 chs Exp $ 2 # 3 # Configuration variables (default values are below): 4 # 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. 9 # FPSPMISCCPPFLAGS 10 # Miscellaneous cpp flags to be passed to the library's Makefile 11 # when building. 12 # FPSPMISCMAKEFLAGS 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. 16 17 # Default values: 18 FPSPDST?= ${.OBJDIR}/lib/fpsp 19 FPSPDOTDIR?= ../../. 20 21 FPSPDIR= ${S:S@^.@${FPSPDOTDIR}@:Q}/arch/m68k/fpsp 22 FPSPOBJ= ${FPSPDST}/fpsp.o 23 FPSP!= printf "\#include \"opt_fpsp.h\"\n\#ifdef FPSP\n${FPSPOBJ}\n\#endif\n" | ${CPP} -P 24 25 26 # CC=${CC:Q} CFLAGS=${CFLAGS:Q} \ 27 # AS=${AS:Q} AFLAGS=${AFLAGS:Q} \ 28 # LD=${LD:Q} STRIP=${STRIP:Q} \ 29 30 FPSPMAKE= \ 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} \ 35 MACHINE=${MACHINE} \ 36 MACHINE_ARCH=${MACHINE_ARCH:Q} \ 37 FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I${FPSPDOTDIR}@g:Q} \ 38 FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:Q} \ 39 FPSPDIR=${FPSPDIR:Q} \ 40 ${FPSPMISCMAKEFLAGS} 41 42 ${FPSP}: .NOTMAIN __always_make_fpsp 43 @echo making sure the 68040 FPSP is up to date... 44 @${FPSPMAKE} fpsp.o 45 46 ${FPSPLIB_PROF}: .NOTMAIN __always_make_fpsp 47 @echo making sure the profiled 68040 FPSP is up to date... 48 @${FPSPMAKE} fpsp.po 49 50 clean: .NOTMAIN cleanfpsp 51 cleanfpsp: .NOTMAIN __always_make_fpsp 52 @echo cleaning the 68040 FPSP objects 53 @${FPSPMAKE} clean 54 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 62 @${FPSPMAKE} clean 63 64 #depend: .NOTMAIN dependfpsp 65 #dependfpsp: .NOTMAIN __always_make_fpsp 66 # @echo depending the 68040 FPSP objects 67 # @${FPSPMAKE} depend 68 # 69 70 __always_make_fpsp: .NOTMAIN 71 @(mkdir -p ${FPSPDST}) 72