Makefile.inc revision 1.1
1#	$NetBSD: Makefile.inc,v 1.1 1997/03/14 02:40:32 perry Exp $
2#
3#	Configuration variables (default values are below):
4#
5#	S	must be set to the top of the 'sys' tree.
6#	I386DST	may be set to the location of the directory where library
7#		objects are to be built.  Defaults to ${.OBJDIR}/lib/i386.
8#	I386MISCCPPFLAGS
9#		Miscellaneous cpp flags to be passed to the library's Makefile
10#		when building.
11#	I386MISCMAKEFLAGS
12#		Miscellaneous flags to be passed to the library's Makefile when
13#		building.  See library's Makefile for more details about
14#		supported flags and their default values.
15
16# Default values:
17I386DST?=		${.OBJDIR}/lib/i386
18
19#I386DIR=		$S/arch/i386/stand/lib
20I386LIB=		${I386DST}/libi386.a
21
22I386MAKE= \
23	cd ${I386DIR} && MAKEOBJDIR=${I386DST} ${MAKE} \
24	    CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
25	    AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
26	    LD=${LD:Q} STRIP=${STRIP:Q} \
27	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
28	    I386CPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
29	    I386MISCCPPFLAGS=${I386MISCCPPFLAGS:Q} \
30	    ${I386MISCMAKEFLAGS}
31
32${I386LIB}:		.NOTMAIN __always_make_i386lib
33	@echo making sure the i386 library is up to date...
34	@${I386MAKE} libi386.a
35
36clean:			.NOTMAIN cleani386lib
37cleani386lib:		.NOTMAIN __always_make_i386lib
38	@echo cleaning the i386 library objects
39	@${I386MAKE} clean
40
41cleandir:		.NOTMAIN cleandiri386lib
42cleandiri386lib:		.NOTMAIN __always_make_i386lib
43	@echo cleandiring the i386 library objects
44	@${I386MAKE} cleandir
45
46depend:			.NOTMAIN dependi386lib
47dependi386lib:		.NOTMAIN __always_make_i386lib
48	@echo depending the i386 library objects
49	@${I386MAKE} depend
50
51__always_make_i386lib:	.NOTMAIN
52	@mkdir -p ${I386DST}
53