Home | History | Annotate | Line # | Download | only in fpsp
Makefile.inc revision 1.8
      1 #	$NetBSD: Makefile.inc,v 1.8 1998/10/14 20:45:43 is 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 
     20 FPSPDIR=	$S/arch/m68k/fpsp
     21 FPSPOBJ=	${FPSPDST}/fpsp.o
     22 FPSP!=	printf "\#ifdef FPSP\n${FPSPOBJ}\n\#endif\n" | ${CPP} -P -undef ${CPPFLAGS:M-DFPSP}
     23 
     24 
     25 #	    CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
     26 #	    AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
     27 #	    LD=${LD:Q} STRIP=${STRIP:Q} \
     28 
     29 FPSPMAKE= \
     30 	cd ${FPSPDIR} && MAKEOBJDIR=${FPSPDST} ${MAKE} .OBJDIR=${FPSPDST} \
     31 	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
     32 	    FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
     33 	    FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:Q} \
     34 	    FPSPDIR=${FPSPDIR:Q} \
     35 	    ${FPSPMISCMAKEFLAGS}
     36 
     37 ${FPSP}:		.NOTMAIN __always_make_fpsp
     38 	@echo making sure the 68040 FPSP is up to date...
     39 	@${FPSPMAKE} fpsp.o
     40 
     41 ${FPSPLIB_PROF}:	.NOTMAIN __always_make_fpsp
     42 	@echo making sure the profiled 68040 FPSP is up to date...
     43 	@${FPSPMAKE} fpsp.po
     44 
     45 clean:			.NOTMAIN cleanfpsp
     46 cleanfpsp:		.NOTMAIN __always_make_fpsp
     47 	@echo cleaning the 68040 FPSP objects
     48 	@${FPSPMAKE} clean
     49 
     50 cleandir distclean:	.NOTMAIN cleandirfpsp
     51 cleandirfpsp:	.NOTMAIN __always_make_fpsp
     52 # So we don't really need a cleandir target without a depend target.
     53 # On the other hand, were "make cleandir" in the kernel build
     54 # directory to fail to remove all the floating point objects, that
     55 # would tend to violate the principle of least surprise!
     56 	@echo cleandiring the 68040 FPSP objects
     57 	@${FPSPMAKE} clean
     58 
     59 #depend:			.NOTMAIN dependfpsp
     60 #dependfpsp:		.NOTMAIN __always_make_fpsp
     61 #	@echo depending the 68040 FPSP objects
     62 #	@${FPSPMAKE} depend
     63 #
     64 
     65 __always_make_fpsp:	.NOTMAIN
     66 	@(mkdir -p ${FPSPDST})
     67