1 # $NetBSD: Makefile,v 1.17 2019/03/29 00:07:39 christos Exp $ 2 3 .include <bsd.init.mk> 4 5 CURDIR= ${.CURDIR} 6 S= ${CURDIR}/../../../.. 7 8 # 9 # Override normal settings 10 # 11 12 PROG= bootblk 13 SRCS= bootblk.fth 14 OBJS= 15 CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp \ 16 bootblk bootblk.text bootblk.text.tmp 17 18 NOMAN= # defined 19 STRIPFLAG= 20 21 USE_GENASSYM?= no 22 23 INCLUDES= -I. -I$S/arch -I$S -I${S}/../common/include -nostdinc 24 CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_MODULE -D_KERNEL 25 26 ffs.fth.h: genfth.cf machine sparc 27 ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 28 ${GENASSYM_CPPFLAGS} < ${.CURDIR}/genfth.cf >ffs.fth.h.tmp && \ 29 mv -f ffs.fth.h.tmp ffs.fth.h 30 31 lfs.fth.h: genlfs.cf machine sparc 32 ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 33 ${GENASSYM_CPPFLAGS} < ${.CURDIR}/genlfs.cf >lfs.fth.h.tmp && \ 34 mv -f lfs.fth.h.tmp lfs.fth.h 35 36 bootblk.text: bootblk.fth ffs.fth.h lfs.fth.h 37 ${TOOL_AWK} '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ 38 ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp && 39 mv -f bootblk.text.tmp bootblk.text 40 41 bootblk: bootblk.fth ffs.fth.h lfs.fth.h 42 ${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth 43 44 beforedepend: 45 @touch .d 46 47 # 48 # The following are if you grab the fakeboot program from the Sun website 49 # 50 51 fake: bootblk bootblk.text 52 ../fakeboot/fakeboot -elf32 <bootblk >/bootblk 53 ../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text 54 55 .include <bsd.klinks.mk> 56 .include <bsd.prog.mk> 57