1 # $NetBSD: Makefile,v 1.35 2009/02/14 13:52:51 abs Exp $
4 PROGSOURCE
= boot.c net.c netif_sun.c conf.c openfirm.c bootinfo.c \
5 mmu.c prompatch.c vers.c
6 NEWVERSWHAT
= "Secondary Boot"
7 FILES
= boot.net bootjs.net
${RELOCS
:S
/^
/boot.
/g
}
8 CLEANFILES
:= vers.c
${FILES}
9 LINKS
= ${BINDIR}/boot.
${RELOC_DEFAULT} ${BINDIR}/boot
11 CPPFLAGS
+= -DBOOT_AOUT
-DBOOT_ELF32
-DSUPPORT_DHCP
12 CFLAGS
+= -freestanding
15 SAMISCMAKEFLAGS
= SA_USE_CREAD
=yes
17 .
include "../Makefile.buildboot"
19 .if
${MACHINE} == sparc64
21 LDFLAGS
+= -m elf32_sparc
27 OBJS
=${SRCS
:N
*.h
:N
*.sh
:N
*.fth
:R
:S
/$/.o
/g
}
36 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.CURDIR
}/version
"sparc" ${NEWVERSWHAT}
38 .for RELOC in
${RELOCS}
39 boot.
${RELOC}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
40 ${LD} -o
${.TARGET
}.tmp
${LINKFLAGS} -Ttext
${RELOC} ${OBJS} \
41 ${LIBSA} ${LIBZ} ${LIBKERN}
42 ${SIZE} ${.TARGET
}.tmp
43 ${OBJCOPY} -O binary
${.TARGET
}.tmp
${.TARGET
}
47 # conjure up a magic header that is accepted by all Sun PROMS;
48 # see installboot.c for details.
50 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'
52 boot.net
: boot.
${RELOC_DEFAULT}
53 (printf
${SUN_MAGIC_HEADER}; cat
${.ALLSRC
} ) > ${.TARGET
}
55 bootjs.net
: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
56 ${LD} -o
${.TARGET
} ${LINKFLAGS} -Ttext
300000 ${OBJS} \
57 ${LIBSA} ${LIBZ} ${LIBKERN}
60 .
include <bsd.prog.mk
>