No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / m68k / fpsp / Makefile.inc
blobaa8aa3db9e124599d7261fcf296955940c2aae33
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.
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.
17 # Default values:
18 FPSPDST?=       ${.OBJDIR}/lib/fpsp
19 FPSPDOTDIR?= ../../.
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
28 #           CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
29 #           AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
30 #           LD=${LD:Q} STRIP=${STRIP:Q} \
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}
44 ${FPSP}:                .NOTMAIN __always_make_fpsp
45         @echo making sure the 68040 FPSP is up to date...
46         @${FPSPMAKE} fpsp.o
48 ${FPSPLIB_PROF}:        .NOTMAIN __always_make_fpsp
49         @echo making sure the profiled 68040 FPSP is up to date...
50         @${FPSPMAKE} fpsp.po
52 clean:                  .NOTMAIN cleanfpsp
53 cleanfpsp:              .NOTMAIN __always_make_fpsp
54         @echo cleaning the 68040 FPSP objects
55         @${FPSPMAKE} clean
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
66 #depend:                        .NOTMAIN dependfpsp
67 #dependfpsp:            .NOTMAIN __always_make_fpsp
68 #       @echo depending the 68040 FPSP objects
69 #       @${FPSPMAKE} depend
72 __always_make_fpsp:     .NOTMAIN
73         @(mkdir -p ${FPSPDST})