Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.26.4.2
      1  1.26.4.2  nathanw #	$NetBSD: Makefile,v 1.26.4.2 2002/01/08 00:27:54 nathanw Exp $
      2  1.26.4.2  nathanw 
      3  1.26.4.2  nathanw STRIPFLAG=
      4  1.26.4.2  nathanw PROGSOURCE=	boot.c net.c netif_sun.c conf.c openfirm.c bootinfo.c \
      5  1.26.4.2  nathanw 		prompatch.c vers.c
      6  1.26.4.2  nathanw NEWVERSWHAT=	"Secondary Boot"
      7  1.26.4.2  nathanw FILES=		boot.net ${RELOCS:S/^/boot./g}
      8  1.26.4.2  nathanw CLEANFILES:=	vers.c ${FILES}
      9  1.26.4.2  nathanw LINKS=		${BINDIR}/boot.${RELOC_DEFAULT} ${BINDIR}/boot
     10  1.26.4.2  nathanw 
     11  1.26.4.2  nathanw CPPFLAGS+=	-DBOOT_AOUT -DBOOT_ELF32
     12  1.26.4.2  nathanw 
     13  1.26.4.2  nathanw INCLUDE_LIBZ=	yes
     14  1.26.4.2  nathanw SAMISCMAKEFLAGS= SA_USE_CREAD=yes
     15  1.26.4.2  nathanw 
     16  1.26.4.2  nathanw .include "../Makefile.buildboot"
     17  1.26.4.2  nathanw 
     18  1.26.4.2  nathanw .if ${MACHINE} == sparc64
     19  1.26.4.2  nathanw CFLAGS+=	-m32
     20  1.26.4.2  nathanw LDFLAGS+=	-m elf32_sparc
     21  1.26.4.2  nathanw AFLAGS+=	-Wa,-32
     22  1.26.4.2  nathanw .endif
     23  1.26.4.2  nathanw 
     24  1.26.4.2  nathanw .include <bsd.own.mk>
     25  1.26.4.2  nathanw 
     26  1.26.4.2  nathanw OBJS=${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
     27  1.26.4.2  nathanw 
     28  1.26.4.2  nathanw LINKFLAGS=-N -e start
     29  1.26.4.2  nathanw 
     30  1.26.4.2  nathanw .MAIN: all
     31  1.26.4.2  nathanw realall: ${FILES}
     32  1.26.4.2  nathanw 
     33  1.26.4.2  nathanw .PHONY: vers.c
     34  1.26.4.2  nathanw vers.c: version
     35  1.26.4.2  nathanw 	sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "sparc" ${NEWVERSWHAT}
     36  1.26.4.2  nathanw 
     37  1.26.4.2  nathanw .for RELOC in ${RELOCS}
     38  1.26.4.2  nathanw boot.${RELOC}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     39  1.26.4.2  nathanw 	${LD} -o ${.TARGET}.tmp ${LINKFLAGS} -Ttext ${RELOC} ${OBJS} \
     40  1.26.4.2  nathanw 	    ${LIBSA} ${LIBZ} ${LIBKERN}
     41  1.26.4.2  nathanw 	${SIZE} ${.TARGET}.tmp
     42  1.26.4.2  nathanw 	${OBJCOPY} -O binary ${.TARGET}.tmp ${.TARGET}
     43  1.26.4.2  nathanw 	rm -f ${.TARGET}.tmp
     44  1.26.4.2  nathanw .endfor
     45  1.26.4.2  nathanw 
     46  1.26.4.2  nathanw # conjure up a magic header that is accepted by all Sun PROMS;
     47  1.26.4.2  nathanw # see installboot.c for details.
     48  1.26.4.2  nathanw 
     49  1.26.4.2  nathanw SUN_MAGIC_HEADER='\01\03\01\07\060\200\0\07\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
     50  1.26.4.2  nathanw 
     51  1.26.4.2  nathanw boot.net: boot.${RELOC_DEFAULT}
     52  1.26.4.2  nathanw 	(printf ${SUN_MAGIC_HEADER}; cat ${.ALLSRC} ) > ${.TARGET}
     53  1.26.4.2  nathanw 
     54  1.26.4.2  nathanw .include <bsd.prog.mk>
     55