Makefile revision 1.10
11.10Stsutsui#	$NetBSD: Makefile,v 1.10 2006/08/28 13:38:43 tsutsui Exp $
21.1Smrg
31.1SmrgCURDIR=	${.CURDIR}
41.1SmrgS=	${CURDIR}/../../../..
51.1Smrg
61.1Smrg#
71.1Smrg# Override normal settings
81.1Smrg#
91.1Smrg
101.1SmrgPROG=	bootblk
111.1SmrgSRCS=		bootblk.fth
121.1SmrgOBJS=
131.1SmrgCLEANFILES=	assym.fth.h assym.fth.h.tmp machine sparc \
141.1Smrg		bootblk bootblk.text bootblk.text.tmp
151.1Smrg
161.3StvNOMAN=		# defined
171.3StvSTRIPFLAG=
181.1Smrg
191.1SmrgUSE_GENASSYM?=	no
201.1Smrg
211.10StsutsuiINCLUDES=	-I. -I$S/arch -I$S -I${S}/../common/include -nostdinc
221.8SthorpejCPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_LKM -D_KERNEL
231.1Smrg
241.1Smrg#all:: bootblk.text bootblk
251.1Smrg
261.1Smrg#clean:: 
271.1Smrg#	rm assym.fth.h bootblk.text machine bootblk
281.1Smrg
291.1Smrgsparc:
301.1Smrg	ln -s ${.CURDIR}/../../../sparc/include sparc
311.1Smrg
321.1Smrgmachine:
331.1Smrg	ln -s ${.CURDIR}/../../../${MACHINE}/include machine
341.1Smrg
351.8Sthorpejassym.fth.h: genfth.cf machine
361.8Sthorpej	${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
371.1Smrg	    <${.CURDIR}/genfth.cf >assym.fth.h.tmp && \
381.1Smrg	    mv -f assym.fth.h.tmp assym.fth.h
391.1Smrg
401.1Smrgbootblk.text: bootblk.fth assym.fth.h
411.1Smrg	awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \
421.1Smrg	    ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp &&
431.1Smrg	    mv -f bootblk.text.tmp bootblk.text
441.1Smrg
451.1Smrgbootblk: bootblk.fth assym.fth.h
461.5Slukem	${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth
471.1Smrg
481.1Smrgbeforedepend:
491.6Smrg	@touch .d
501.1Smrg
511.1Smrg#
521.1Smrg# The following are if you grab the fakeboot program from the Sun website
531.1Smrg#
541.1Smrg
551.1Smrgfake: bootblk bootblk.text
561.1Smrg	../fakeboot/fakeboot -elf32 <bootblk >/bootblk
571.1Smrg	../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
581.1Smrg
591.1Smrg.include <bsd.prog.mk>
60