Home | History | Annotate | Line # | Download | only in stand
Makefile.bootxx revision 1.3.62.1
      1  1.3.62.1     yamt #	$NetBSD: Makefile.bootxx,v 1.3.62.1 2009/05/04 08:11:04 yamt Exp $
      2       1.1  tsutsui 
      3       1.1  tsutsui NOMAN		=
      4       1.1  tsutsui 
      5       1.1  tsutsui BINMODE		= 0444
      6       1.1  tsutsui 
      7       1.1  tsutsui S		= ${.CURDIR}/../../../..
      8       1.1  tsutsui COMMON		= ${.CURDIR}/../common
      9       1.1  tsutsui 
     10       1.1  tsutsui .PATH:		${COMMON}
     11       1.1  tsutsui 
     12       1.1  tsutsui PROG		= ${BASE}
     13       1.1  tsutsui SRCS		+= entry.S bootxx.c
     14       1.1  tsutsui SRCS		+= boot_device.c floppy_2d.c floppy_2hd_ibmpc.c
     15       1.1  tsutsui #SRCS		+= floppy_2hc.c
     16       1.1  tsutsui BINMODE		= 444
     17       1.1  tsutsui 
     18       1.2    lukem LINKFLAGS	= -T ${COMMON}/bootxx.ldscript -S -N
     19       1.1  tsutsui MIPSFLAGS	= -mips1 -G 0 -mno-abicalls
     20       1.1  tsutsui DEBUGFLAGS	= -Wall -Werror
     21       1.1  tsutsui DEBUGFLAGS	+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
     22       1.1  tsutsui DEBUGFLAGS	+= -Wno-format-zero-length -Wno-sign-compare
     23       1.1  tsutsui OPTFLAGS	= -Os -mmemcpy
     24       1.1  tsutsui FLAGS		= ${MIPSFLAGS} ${DEBUGFLAGS} ${OPTFLAGS}
     25       1.1  tsutsui AFLAGS		= -xassembler-with-cpp -D_LOCORE ${FLAGS}
     26       1.1  tsutsui CFLAGS		= ${FLAGS} -ffreestanding
     27       1.1  tsutsui 
     28       1.1  tsutsui CPPFLAGS	+= -D_STANDALONE
     29       1.1  tsutsui CPPFLAGS	+= -nostdinc -I${.OBJDIR} -I${COMMON} -I${S}
     30       1.1  tsutsui CPPFLAGS	+= -D__daddr_t=int32_t
     31       1.1  tsutsui 
     32  1.3.62.1     yamt CLEANFILES	+= ${PROG} ${PROG}.bin ${PROG}.elf ${PROG}.tmp
     33       1.1  tsutsui 
     34       1.1  tsutsui KERN_AS		= library
     35       1.1  tsutsui .include	"${S}/lib/libkern/Makefile.inc"
     36       1.1  tsutsui LIBKERN		= ${KERNLIB}
     37       1.1  tsutsui 
     38       1.1  tsutsui LIBS		= ${LIBKERN}
     39       1.1  tsutsui 
     40  1.3.62.1     yamt # XXX SHOULD NOT NEED TO DEFINE THESE!
     41  1.3.62.1     yamt LIBCRT0=
     42  1.3.62.1     yamt LIBC=
     43  1.3.62.1     yamt LIBCRTBEGIN=
     44  1.3.62.1     yamt LIBCRTEND=
     45       1.1  tsutsui 
     46       1.1  tsutsui ${PROG}: ${OBJS} ${LIBS}
     47       1.3    lukem 	${_MKTARGET_LINK}
     48       1.2    lukem 	${LD} ${LINKFLAGS} -o ${PROG}.elf ${OBJS} ${LIBS}
     49       1.1  tsutsui 	${OBJCOPY} -O binary ${PROG}.elf ${BASE}.bin
     50       1.1  tsutsui 	ls -al ${BASE}.bin
     51       1.1  tsutsui 	dd if=${BASE}.bin of=${PROG}.tmp bs=4096 conv=sync
     52       1.1  tsutsui 	mv ${PROG}.tmp ${PROG}
     53       1.1  tsutsui 	ls -al ${PROG}
     54       1.1  tsutsui #	-rm -f ${BASE}.tmp
     55       1.1  tsutsui 
     56       1.1  tsutsui clean cleandir distclean: cleanlibdir
     57       1.1  tsutsui 
     58       1.1  tsutsui cleanlibdir:
     59       1.1  tsutsui 	-rm -rf lib
     60       1.1  tsutsui 
     61  1.3.62.1     yamt .include <bsd.klinks.mk>
     62       1.1  tsutsui .include <bsd.prog.mk>
     63