1 # $NetBSD: Makefile,v 1.15 2014/03/04 17:57:56 joerg 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 \ 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 ffs.fth.h: genfth.cf machine sparc 25 ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 26 ${GENASSYM_CPPFLAGS} < ${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \ 27 mv -f ffs.fth.h.tmp ffs.fth.h 28 29 lfs.fth.h: genlfs.cf machine sparc 30 ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 31 ${GENASSYM_CPPFLAGS} < ${.CURDIR}/genlfs.cf >lfs.fth.h.tmp && \ 32 mv -f lfs.fth.h.tmp lfs.fth.h 33 34 bootblk.text: bootblk.fth ffs.fth.h lfs.fth.h 35 ${TOOL_AWK} '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ 36 ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp && 37 mv -f bootblk.text.tmp bootblk.text 38 39 bootblk: bootblk.fth ffs.fth.h lfs.fth.h 40 ${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth 41 42 beforedepend: 43 @touch .d 44 45 # 46 # The following are if you grab the fakeboot program from the Sun website 47 # 48 49 fake: bootblk bootblk.text 50 ../fakeboot/fakeboot -elf32 <bootblk >/bootblk 51 ../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text 52 53 .include <bsd.klinks.mk> 54 .include <bsd.prog.mk> 55