xref: /netbsd/sys/arch/hppa/spmath/Makefile.inc (revision c4a72b64)
1#	$NetBSD: Makefile.inc,v 1.1 2002/06/05 01:04:24 fredette 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} && MAKEOBJDIR=${SPMATHDST} ${MAKE} \
17	    CC='${CC}' CFLAGS='${CFLAGS}' \
18	    CPPFLAGS='${CPPFLAGS:S@^-I.@-I../../.@g}'\
19	    AS='${AS}' AFLAGS='${AFLAGS}' \
20	    LD='${LD}' STRIP='${STRIP}' \
21	    CPP='${CPP}' STRIP='${STRIP}' AR='${AR}' \
22	    NM='${NM}' LORDER='${LORDER}' \
23	    XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}' \
24
25${SPMATH}:	.NOTMAIN __always_make_spmath
26	@echo making sure the spmath library is up to date...
27	@${SPMATHMAKE} spmath.o
28
29${SPMATH_PROF}:	.NOTMAIN __always_make_spmath
30	@echo making sure the profiled spmath library is up to date...
31	@${SPMATHMAKE} spmath.po
32
33__CLEANSPMATH:	.NOTMAIN __always_make_spmath
34	@echo cleaning the spmath library objects
35	@${SPMATHMAKE} clean
36
37clean:	__CLEANSPMATH
38
39__DEPENDSPMATH:	.NOTMAIN __always_make_spmath assym.h
40	@echo depending the spmath library objects
41	@${SPMATHMAKE} depend
42
43depend:	__DEPENDSPMATH
44
45__always_make_spmath:	.NOTMAIN
46	-mkdir -p ${SPMATHDST}
47
48