Home | History | Annotate | Line # | Download | only in stand
Makefile.bootxx revision 1.7
      1  1.7   tsutsui #	$NetBSD: Makefile.bootxx,v 1.7 2014/01/12 15:26:29 tsutsui 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.6     joerg OPTFLAGS	= -Os -mmemcpy -fno-unwind-tables
     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.4   tsutsui 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.4   tsutsui # XXX SHOULD NOT NEED TO DEFINE THESE!
     41  1.4   tsutsui LIBCRT0=
     42  1.7   tsutsui LIBCRTI=
     43  1.4   tsutsui LIBC=
     44  1.4   tsutsui LIBCRTBEGIN=
     45  1.4   tsutsui LIBCRTEND=
     46  1.1   tsutsui 
     47  1.1   tsutsui ${PROG}: ${OBJS} ${LIBS}
     48  1.3     lukem 	${_MKTARGET_LINK}
     49  1.2     lukem 	${LD} ${LINKFLAGS} -o ${PROG}.elf ${OBJS} ${LIBS}
     50  1.1   tsutsui 	${OBJCOPY} -O binary ${PROG}.elf ${BASE}.bin
     51  1.1   tsutsui 	ls -al ${BASE}.bin
     52  1.1   tsutsui 	dd if=${BASE}.bin of=${PROG}.tmp bs=4096 conv=sync
     53  1.1   tsutsui 	mv ${PROG}.tmp ${PROG}
     54  1.1   tsutsui 	ls -al ${PROG}
     55  1.1   tsutsui #	-rm -f ${BASE}.tmp
     56  1.1   tsutsui 
     57  1.5  dholland clean cleandir distclean: .WAIT cleanlibdir
     58  1.1   tsutsui 
     59  1.1   tsutsui cleanlibdir:
     60  1.1   tsutsui 	-rm -rf lib
     61  1.1   tsutsui 
     62  1.4   tsutsui .include <bsd.klinks.mk>
     63  1.1   tsutsui .include <bsd.prog.mk>
     64