Makefile.inc revision 1.5
1#	$NetBSD: Makefile.inc,v 1.5 2015/09/05 04:44:29 uebayasi Exp $
2
3#	$OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $
4#
5#	NOTE:	$S must correspond to the top of the 'sys' tree
6#		$HPPA must correspond to the top of hppa tree
7
8SPMATHDIR=	${HPPA}/spmath
9
10SPMATHDST?=	${.OBJDIR}/lib/spmath
11
12SPMATH=		${SPMATHDST}/spmath.o
13SPMATH_PROF=	${SPMATHDST}/spmath.po
14
15SPMATHMAKE= \
16	cd ${SPMATHDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
17	  MAKEOBJDIR=${SPMATHDST} ${MAKE} \
18	    CC='${CC}' CFLAGS='${CFLAGS}' \
19	    SPMATHCPPFLAGS='${CPPFLAGS:S@^-I.@-I. -I../../.@g}'\
20	    AS='${AS}' AFLAGS='${AFLAGS}' \
21	    LD='${LD}' STRIP='${STRIP}' \
22	    CPP='${CPP}' STRIP='${STRIP}' AR='${AR}' \
23	    NM='${NM}' LORDER='${LORDER}' \
24	    XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}'
25
26spmath.o: ${SPMATH}
27	ln -sf ${SPMATH} $@
28
29${SPMATH}:	.NOTMAIN .MAKE __always_make_spmath
30	@echo making sure the spmath library is up to date...
31	@${SPMATHMAKE} spmath.o
32
33${SPMATH_PROF}:	.NOTMAIN .MAKE __always_make_spmath
34	@echo making sure the profiled spmath library is up to date...
35	@${SPMATHMAKE} spmath.po
36
37__CLEANSPMATH:	.NOTMAIN .MAKE __always_make_spmath
38	@echo cleaning the spmath library objects
39	@${SPMATHMAKE} clean
40
41clean:	__CLEANSPMATH
42
43__DEPENDSPMATH:	.NOTMAIN .MAKE __always_make_spmath assym.h
44	@echo depending the spmath library objects
45	@${SPMATHMAKE} depend
46
47depend:	__DEPENDSPMATH
48
49__always_make_spmath:	.NOTMAIN
50	-mkdir -p ${SPMATHDST}
51
52