Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / sparc / stand / boot / Makefile
blob57e408727bc7729c5d447a5a1f62d22fafe8fcfd
1 # $NetBSD: Makefile,v 1.35 2009/02/14 13:52:51 abs Exp $
3 STRIPFLAG=
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
14 INCLUDE_LIBZ= yes
15 SAMISCMAKEFLAGS= SA_USE_CREAD=yes
17 .include "../Makefile.buildboot"
19 .if ${MACHINE} == sparc64
20 CFLAGS+= -m32
21 LDFLAGS+= -m elf32_sparc
22 AFLAGS+= -Wa,-32
23 .endif
25 .include <bsd.own.mk>
27 OBJS=${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
29 LINKFLAGS=-N -e start
31 .MAIN: all
32 realall: ${FILES}
34 .PHONY: vers.c
35 vers.c: version
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}
44 rm -f ${.TARGET}.tmp
45 .endfor
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}
58 ${SIZE} ${.TARGET}
60 .include <bsd.prog.mk>