config: fix build with external compiler by passing the sysroot where needed
[AROS.git] / arch / m68k-all / m680x0 / fpsp / Makefile.inc
blob18381801c744f3e87e9bdfcf111c51abac006be8
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 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} \
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}
42 ${FPSP}:                .NOTMAIN __always_make_fpsp
43         @echo making sure the 68040 FPSP is up to date...
44         @${FPSPMAKE} fpsp.o
46 ${FPSPLIB_PROF}:        .NOTMAIN __always_make_fpsp
47         @echo making sure the profiled 68040 FPSP is up to date...
48         @${FPSPMAKE} fpsp.po
50 clean:                  .NOTMAIN cleanfpsp
51 cleanfpsp:              .NOTMAIN __always_make_fpsp
52         @echo cleaning the 68040 FPSP objects
53         @${FPSPMAKE} clean
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
64 #depend:                        .NOTMAIN dependfpsp
65 #dependfpsp:            .NOTMAIN __always_make_fpsp
66 #       @echo depending the 68040 FPSP objects
67 #       @${FPSPMAKE} depend
70 __always_make_fpsp:     .NOTMAIN
71         @(mkdir -p ${FPSPDST})