Makefile.inc revision 1.10
1#	$NetBSD: Makefile.inc,v 1.10 2001/08/18 12:48:59 enami 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} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
24	    MAKEOBJDIR=${I386DST} ${MAKE} \
25	    CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
26	    AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
27	    LD=${LD:Q} STRIP=${STRIP:Q} \
28	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
29	    I386CPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
30	    I386MISCCPPFLAGS=${I386MISCCPPFLAGS:Q} \
31	    ${I386MISCMAKEFLAGS}
32
33${I386LIB}:		.NOTMAIN __always_make_i386lib
34	@echo making sure the i386 library is up to date...
35	@${I386MAKE} libi386.a
36
37clean:			.NOTMAIN cleani386lib
38cleani386lib:		.NOTMAIN __always_make_i386lib
39	@echo cleaning the i386 library objects
40	@${I386MAKE} clean
41
42cleandir distclean:	.NOTMAIN cleandiri386lib
43cleandiri386lib:	.NOTMAIN __always_make_i386lib
44	@echo cleandiring the i386 library objects
45	@${I386MAKE} cleandir
46
47depend:			.NOTMAIN dependi386lib
48dependi386lib:		.NOTMAIN __always_make_i386lib
49	@echo depending the i386 library objects
50	@${I386MAKE} depend
51
52__always_make_i386lib:	.NOTMAIN
53	@mkdir -p ${I386DST}
54