Home | History | Annotate | Line # | Download | only in bootblk
Makefile revision 1.6
      1 #	$NetBSD: Makefile,v 1.6 2003/07/30 15:58:40 mrg Exp $
      2 
      3 CURDIR=	${.CURDIR}
      4 S=	${CURDIR}/../../../..
      5 
      6 #
      7 # Override normal settings
      8 #
      9 
     10 PROG=	bootblk
     11 SRCS=		bootblk.fth
     12 OBJS=
     13 CLEANFILES=	assym.fth.h assym.fth.h.tmp machine sparc \
     14 		bootblk bootblk.text bootblk.text.tmp
     15 
     16 NOMAN=		# defined
     17 STRIPFLAG=
     18 
     19 USE_GENASSYM?=	no
     20 
     21 INCLUDES=	-I. -I$S/arch -I$S -nostdinc
     22 CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_LKM
     23 
     24 #all:: bootblk.text bootblk
     25 
     26 #clean:: 
     27 #	rm assym.fth.h bootblk.text machine bootblk
     28 
     29 sparc:
     30 	ln -s ${.CURDIR}/../../../sparc/include sparc
     31 
     32 machine:
     33 	ln -s ${.CURDIR}/../../../${MACHINE}/include machine
     34 
     35 assym.fth.h: ${.CURDIR}/genassym.sh genfth.cf machine
     36 	sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
     37 	    <${.CURDIR}/genfth.cf >assym.fth.h.tmp && \
     38 	    mv -f assym.fth.h.tmp assym.fth.h
     39 
     40 bootblk.text: bootblk.fth assym.fth.h
     41 	awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \
     42 	    ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp &&
     43 	    mv -f bootblk.text.tmp bootblk.text
     44 
     45 bootblk: bootblk.fth assym.fth.h
     46 	${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth
     47 
     48 beforedepend:
     49 	@touch .d
     50 
     51 #
     52 # The following are if you grab the fakeboot program from the Sun website
     53 #
     54 
     55 fake: bootblk bootblk.text
     56 	../fakeboot/fakeboot -elf32 <bootblk >/bootblk
     57 	../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
     58 
     59 .include <bsd.prog.mk>
     60