Makefile.inc revision 1.8
1#	$NetBSD: Makefile.inc,v 1.8 2016/01/25 18:55:25 christos 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:Q} CFLAGS=${CFLAGS:Q} \
19	    SPMATHCPPFLAGS=${CPPFLAGS:S@^-I.@-I. -I../../.@g:Q} \
20	    AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
21	    LD=${LD:Q} STRIP=${STRIP:Q} \
22	    CPP=${CPP:Q} STRIP=${STRIP:Q} AR=${AR:Q} \
23	    NM=${NM:Q} LORDER=${LORDER:Q} \
24	    XMACHINE=${MACHINE:Q} XMACHINE_ARCH=${MACHINE_ARCH:Q}
25
26${SPMATH}:	.NOTMAIN .MAKE __always_make_spmath
27	@echo making sure the spmath library is up to date...
28	@${SPMATHMAKE} spmath.o
29	@echo done
30
31${SPMATH_PROF}:	.NOTMAIN .MAKE __always_make_spmath
32	@echo making sure the profiled spmath library is up to date...
33	@${SPMATHMAKE} spmath.po
34	@echo done
35
36__CLEANSPMATH:	.NOTMAIN .MAKE __always_make_spmath
37	@echo cleaning the spmath library objects
38	@${SPMATHMAKE} clean
39	@echo done
40
41clean:	__CLEANSPMATH
42
43__DEPENDSPMATH:	.NOTMAIN .MAKE __always_make_spmath assym.h
44	@echo depending the spmath library objects
45	@${SPMATHMAKE} depend
46	@echo done
47
48depend:	__DEPENDSPMATH
49
50__always_make_spmath:	.NOTMAIN
51	-mkdir -p ${SPMATHDST}
52
53