Makefile revision 1.1
11.1Smrg#	$NetBSD: Makefile,v 1.1 2000/08/20 14:58:45 mrg 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.1SmrgNOMAN=
171.1SmrgSTRIPFLAG=
181.1Smrg
191.1Smrg# deal with Solaris vs. NetBSD build environments for now ..
201.1SmrgOS!=uname -s
211.1Smrg.if (${OS} == "NetBSD")
221.1SmrgUSE_GENASSYM?=	no
231.1SmrgSVR4=
241.1Smrg.else
251.1SmrgUSE_GENASSYM?=	yes
261.1SmrgSVR4=-U__SVR4 -U__svr4__ -D__NetBSD__
271.1Smrg.endif
281.1Smrg
291.1SmrgINCLUDES=	-I. -I$S/arch -I$S -nostdinc
301.1SmrgCPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_LKM ${SVR4}
311.1Smrg
321.1Smrg#all:: bootblk.text bootblk
331.1Smrg
341.1Smrg#clean:: 
351.1Smrg#	rm assym.fth.h bootblk.text machine bootblk
361.1Smrg
371.1Smrgsparc:
381.1Smrg	ln -s ${.CURDIR}/../../../sparc/include sparc
391.1Smrg
401.1Smrgmachine:
411.1Smrg	ln -s ${.CURDIR}/../../../${MACHINE}/include machine
421.1Smrg
431.1Smrgassym.fth.h: ${.CURDIR}/genassym.sh genfth.cf machine
441.1Smrg	sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
451.1Smrg	    <${.CURDIR}/genfth.cf >assym.fth.h.tmp && \
461.1Smrg	    mv -f assym.fth.h.tmp assym.fth.h
471.1Smrg
481.1Smrgbootblk.text: bootblk.fth assym.fth.h
491.1Smrg	awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \
501.1Smrg	    ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp &&
511.1Smrg	    mv -f bootblk.text.tmp bootblk.text
521.1Smrg
531.1Smrgbootblk: bootblk.fth assym.fth.h
541.1Smrg	fgen -o bootblk ${.CURDIR}/bootblk.fth
551.1Smrg
561.1Smrgbeforedepend:
571.1Smrg	@touch .depend
581.1Smrg
591.1Smrg#
601.1Smrg# The following are if you grab the fakeboot program from the Sun website
611.1Smrg#
621.1Smrg
631.1Smrgfake: bootblk bootblk.text
641.1Smrg	../fakeboot/fakeboot -elf32 <bootblk >/bootblk
651.1Smrg	../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
661.1Smrg
671.1Smrg.include <bsd.prog.mk>
68