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