1# $NetBSD: Makefile,v 1.17 2019/03/29 00:07:39 christos Exp $ 2 3.include <bsd.init.mk> 4 5CURDIR= ${.CURDIR} 6S= ${CURDIR}/../../../.. 7 8# 9# Override normal settings 10# 11 12PROG= bootblk 13SRCS= bootblk.fth 14OBJS= 15CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp \ 16 bootblk bootblk.text bootblk.text.tmp 17 18NOMAN= # defined 19STRIPFLAG= 20 21USE_GENASSYM?= no 22 23INCLUDES= -I. -I$S/arch -I$S -I${S}/../common/include -nostdinc 24CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_MODULE -D_KERNEL 25 26ffs.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 31lfs.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 36bootblk.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 41bootblk: bootblk.fth ffs.fth.h lfs.fth.h 42 ${TOOL_FGEN} -o bootblk ${.CURDIR}/bootblk.fth 43 44beforedepend: 45 @touch .d 46 47# 48# The following are if you grab the fakeboot program from the Sun website 49# 50 51fake: 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