1 # $NetBSD: Makefile,v 1.1 2000/08/20 14:58:45 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= 17 STRIPFLAG= 18 19 # deal with Solaris vs. NetBSD build environments for now .. 20 OS!=uname -s 21 .if (${OS} == "NetBSD") 22 USE_GENASSYM?= no 23 SVR4= 24 .else 25 USE_GENASSYM?= yes 26 SVR4=-U__SVR4 -U__svr4__ -D__NetBSD__ 27 .endif 28 29 INCLUDES= -I. -I$S/arch -I$S -nostdinc 30 CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM ${SVR4} 31 32 #all:: bootblk.text bootblk 33 34 #clean:: 35 # rm assym.fth.h bootblk.text machine bootblk 36 37 sparc: 38 ln -s ${.CURDIR}/../../../sparc/include sparc 39 40 machine: 41 ln -s ${.CURDIR}/../../../${MACHINE}/include machine 42 43 assym.fth.h: ${.CURDIR}/genassym.sh genfth.cf machine 44 sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 45 <${.CURDIR}/genfth.cf >assym.fth.h.tmp && \ 46 mv -f assym.fth.h.tmp assym.fth.h 47 48 bootblk.text: bootblk.fth assym.fth.h 49 awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ 50 ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp && 51 mv -f bootblk.text.tmp bootblk.text 52 53 bootblk: bootblk.fth assym.fth.h 54 fgen -o bootblk ${.CURDIR}/bootblk.fth 55 56 beforedepend: 57 @touch .depend 58 59 # 60 # The following are if you grab the fakeboot program from the Sun website 61 # 62 63 fake: bootblk bootblk.text 64 ../fakeboot/fakeboot -elf32 <bootblk >/bootblk 65 ../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text 66 67 .include <bsd.prog.mk> 68