1 # $NetBSD: Makefile.inc,v 1.21 2018/05/27 01:14:50 christos 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 HAS_FPSP!= grep '^\#define FPSP 1$$' opt_fpsp.h || echo 24 .if !empty(HAS_FPSP) 25 FPSP= ${FPSPOBJ} 26 .endif 27 28 # CC=${CC:q} CFLAGS=${CFLAGS:q} \ 29 # AS=${AS:q} AFLAGS=${AFLAGS:q} \ 30 # LD=${LD:q} STRIP=${STRIP:q} \ 31 32 FPSPMAKE= \ 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} \ 37 MACHINE=${MACHINE} \ 38 MACHINE_ARCH=${MACHINE_ARCH:q} \ 39 FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I${FPSPDOTDIR}@g:q} \ 40 FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:q} \ 41 FPSPDIR=${FPSPDIR:q} \ 42 ${FPSPMISCMAKEFLAGS} 43 44 ${FPSP}: .NOTMAIN __always_make_fpsp 45 @echo making sure the 68040 FPSP is up to date... 46 @${FPSPMAKE} fpsp.o 47 48 ${FPSPLIB_PROF}: .NOTMAIN __always_make_fpsp 49 @echo making sure the profiled 68040 FPSP is up to date... 50 @${FPSPMAKE} fpsp.po 51 52 clean: .NOTMAIN cleanfpsp 53 cleanfpsp: .NOTMAIN __always_make_fpsp 54 @echo cleaning the 68040 FPSP objects 55 @${FPSPMAKE} clean 56 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 64 @${FPSPMAKE} clean 65 66 #depend: .NOTMAIN dependfpsp 67 #dependfpsp: .NOTMAIN __always_make_fpsp 68 # @echo depending the 68040 FPSP objects 69 # @${FPSPMAKE} depend 70 # 71 72 __always_make_fpsp: .NOTMAIN 73 @(mkdir -p ${FPSPDST}) 74