11.17Schristos#	$NetBSD: Makefile,v 1.17 2019/03/29 00:07:39 christos Exp $
21.16Schristos
31.16Schristos.include	<bsd.init.mk>
41.1Smrg
51.1SmrgCURDIR=	${.CURDIR}
61.1SmrgS=	${CURDIR}/../../../..
71.1Smrg
81.1Smrg#
91.1Smrg# Override normal settings
101.1Smrg#
111.1Smrg
121.1SmrgPROG=	bootblk
131.1SmrgSRCS=		bootblk.fth
141.1SmrgOBJS=
151.14SmattCLEANFILES=	ffs.fth.h lfs.fth.h assym.fth.h.tmp \
161.1Smrg		bootblk bootblk.text bootblk.text.tmp
171.1Smrg
181.3StvNOMAN=		# defined
191.3StvSTRIPFLAG=
201.1Smrg
211.1SmrgUSE_GENASSYM?=	no
221.1Smrg
231.10StsutsuiINCLUDES=	-I. -I$S/arch -I$S -I${S}/../common/include -nostdinc
241.17SchristosCPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_MODULE -D_KERNEL
251.1Smrg
261.13Seehffs.fth.h: genfth.cf machine sparc
271.8Sthorpej	${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
281.15Sjoerg	    ${GENASSYM_CPPFLAGS} < ${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \
291.13Seeh	    mv -f ffs.fth.h.tmp ffs.fth.h
301.1Smrg
311.13Seehlfs.fth.h: genlfs.cf machine sparc
321.13Seeh	${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
331.15Sjoerg	    ${GENASSYM_CPPFLAGS} < ${.CURDIR}/genlfs.cf >lfs.fth.h.tmp && \
341.13Seeh	    mv -f lfs.fth.h.tmp lfs.fth.h
351.13Seeh
361.13Seehbootblk.text: bootblk.fth ffs.fth.h lfs.fth.h
371.11Sapb	${TOOL_AWK} '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \
381.1Smrg	    ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp &&
391.1Smrg	    mv -f bootblk.text.tmp bootblk.text
401.1Smrg
411.13Seehbootblk: bootblk.fth ffs.fth.h lfs.fth.h
421.5Slukem	${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth
431.1Smrg
441.1Smrgbeforedepend:
451.6Smrg	@touch .d
461.1Smrg
471.1Smrg#
481.1Smrg# The following are if you grab the fakeboot program from the Sun website
491.1Smrg#
501.1Smrg
511.1Smrgfake: bootblk bootblk.text
521.1Smrg	../fakeboot/fakeboot -elf32 <bootblk >/bootblk
531.1Smrg	../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
541.1Smrg
551.14Smatt.include <bsd.klinks.mk>
561.1Smrg.include <bsd.prog.mk>
57