Makefile revision 1.13
11.13Seeh#	$NetBSD: Makefile,v 1.13 2010/02/13 23:38:17 eeh 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.13SeehCLEANFILES=	ffs.fth.h lfs.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.13Seehffs.fth.h: genfth.cf machine sparc
361.8Sthorpej	${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
371.13Seeh	    <${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \
381.13Seeh	    mv -f ffs.fth.h.tmp ffs.fth.h
391.1Smrg
401.13Seehlfs.fth.h: genlfs.cf machine sparc
411.13Seeh	${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
421.13Seeh	    <${.CURDIR}/genlfs.cf >lfs.fth.h.tmp && \
431.13Seeh	    mv -f lfs.fth.h.tmp lfs.fth.h
441.13Seeh
451.13Seehbootblk.text: bootblk.fth ffs.fth.h lfs.fth.h
461.11Sapb	${TOOL_AWK} '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \
471.1Smrg	    ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp &&
481.1Smrg	    mv -f bootblk.text.tmp bootblk.text
491.1Smrg
501.13Seehbootblk: bootblk.fth ffs.fth.h lfs.fth.h
511.5Slukem	${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth
521.1Smrg
531.1Smrgbeforedepend:
541.6Smrg	@touch .d
551.1Smrg
561.1Smrg#
571.1Smrg# The following are if you grab the fakeboot program from the Sun website
581.1Smrg#
591.1Smrg
601.1Smrgfake: bootblk bootblk.text
611.1Smrg	../fakeboot/fakeboot -elf32 <bootblk >/bootblk
621.1Smrg	../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
631.1Smrg
641.1Smrg.include <bsd.prog.mk>
65