1 # $NetBSD: Makefile,v 1.13 2010/02/13 23:38:17 eeh 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= ffs.fth.h lfs.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 -I${S}/../common/include -nostdinc 22 CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM -D_KERNEL 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 ffs.fth.h: genfth.cf machine sparc 36 ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 37 <${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \ 38 mv -f ffs.fth.h.tmp ffs.fth.h 39 40 lfs.fth.h: genlfs.cf machine sparc 41 ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 42 <${.CURDIR}/genlfs.cf >lfs.fth.h.tmp && \ 43 mv -f lfs.fth.h.tmp lfs.fth.h 44 45 bootblk.text: bootblk.fth ffs.fth.h lfs.fth.h 46 ${TOOL_AWK} '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ 47 ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp && 48 mv -f bootblk.text.tmp bootblk.text 49 50 bootblk: bootblk.fth ffs.fth.h lfs.fth.h 51 ${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth 52 53 beforedepend: 54 @touch .d 55 56 # 57 # The following are if you grab the fakeboot program from the Sun website 58 # 59 60 fake: bootblk bootblk.text 61 ../fakeboot/fakeboot -elf32 <bootblk >/bootblk 62 ../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text 63 64 .include <bsd.prog.mk> 65