1 # $NetBSD: Makefile.bootxx,v 1.3 2006/06/28 16:28:51 lukem Exp $
7 S = ${.CURDIR}/../../../..
8 COMMON = ${.CURDIR}/../common
13 SRCS += entry.S bootxx.c
14 SRCS += boot_device.c floppy_2d.c floppy_2hd_ibmpc.c
18 LINKFLAGS = -T ${COMMON}/bootxx.ldscript -S -N
19 MIPSFLAGS = -mips1 -G 0 -mno-abicalls
20 DEBUGFLAGS = -Wall -Werror
21 DEBUGFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
22 DEBUGFLAGS += -Wno-format-zero-length -Wno-sign-compare
23 OPTFLAGS = -Os -mmemcpy
24 FLAGS = ${MIPSFLAGS} ${DEBUGFLAGS} ${OPTFLAGS}
25 AFLAGS = -xassembler-with-cpp -D_LOCORE ${FLAGS}
26 CFLAGS = ${FLAGS} -ffreestanding
28 CPPFLAGS += -D_STANDALONE
29 CPPFLAGS += -nostdinc -I${.OBJDIR} -I${COMMON} -I${S}
30 CPPFLAGS += -D__daddr_t=int32_t
32 CLEANFILES += ${PROG} ${PROG}.bin ${PROG}.elf ${PROG}.tmp
35 .include "${S}/lib/libkern/Makefile.inc"
40 # XXX SHOULD NOT NEED TO DEFINE THESE!
46 ${PROG}: ${OBJS} ${LIBS}
48 ${LD} ${LINKFLAGS} -o ${PROG}.elf ${OBJS} ${LIBS}
49 ${OBJCOPY} -O binary ${PROG}.elf ${BASE}.bin
51 dd if=${BASE}.bin of=${PROG}.tmp bs=4096 conv=sync
52 mv ${PROG}.tmp ${PROG}
56 clean cleandir distclean: cleanlibdir
61 .include <bsd.klinks.mk>
62 .include <bsd.prog.mk>