]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - sys/boot/powerpc/ofw/Makefile
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / sys / boot / powerpc / ofw / Makefile
1 # $FreeBSD$
2
3 .include <bsd.own.mk>
4 MK_SSP=         no
5
6 PROG=           loader
7 NEWVERSWHAT=    "Open Firmware loader" ${MACHINE_ARCH}
8 BINDIR?=        /boot
9 INSTALLFLAGS=   -b
10
11 # Architecture-specific loader code
12 SRCS=           conf.c metadata.c vers.c start.c
13
14 LOADER_DISK_SUPPORT?=   yes
15 LOADER_UFS_SUPPORT?=    yes
16 LOADER_CD9660_SUPPORT?= yes
17 LOADER_EXT2FS_SUPPORT?= no
18 LOADER_NET_SUPPORT?=    yes
19 LOADER_NFS_SUPPORT?=    yes
20 LOADER_TFTP_SUPPORT?=   no
21 LOADER_GZIP_SUPPORT?=   yes
22 LOADER_BZIP2_SUPPORT?=  no
23
24 .if ${LOADER_DISK_SUPPORT} == "yes"
25 CFLAGS+=        -DLOADER_DISK_SUPPORT
26 .endif
27 .if ${LOADER_UFS_SUPPORT} == "yes"
28 CFLAGS+=        -DLOADER_UFS_SUPPORT
29 .endif
30 .if ${LOADER_CD9660_SUPPORT} == "yes"
31 CFLAGS+=        -DLOADER_CD9660_SUPPORT
32 .endif
33 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
34 CFLAGS+=        -DLOADER_EXT2FS_SUPPORT
35 .endif
36 .if ${LOADER_GZIP_SUPPORT} == "yes"
37 CFLAGS+=        -DLOADER_GZIP_SUPPORT
38 .endif
39 .if ${LOADER_BZIP2_SUPPORT} == "yes"
40 CFLAGS+=        -DLOADER_BZIP2_SUPPORT
41 .endif
42 .if ${LOADER_NET_SUPPORT} == "yes"
43 CFLAGS+=        -DLOADER_NET_SUPPORT
44 .endif
45 .if ${LOADER_NFS_SUPPORT} == "yes"
46 CFLAGS+=        -DLOADER_NFS_SUPPORT
47 .endif
48 .if ${LOADER_TFTP_SUPPORT} == "yes"
49 CFLAGS+=        -DLOADER_TFTP_SUPPORT
50 .endif
51
52 .if ${MK_FORTH} != "no"
53 # Enable BootForth
54 BOOT_FORTH=     yes
55 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
56 LIBFICL=        ${.OBJDIR}/../../ficl/libficl.a
57 .endif
58
59 # Avoid the open-close-dance for every file access as some firmwares perform
60 # an auto-negotiation on every open of the network interface and thus causes
61 # netbooting to take horribly long.
62 CFLAGS+=        -DNETIF_OPEN_CLOSE_ONCE
63
64 # Always add MI sources
65 .PATH:          ${.CURDIR}/../../common
66 .include        "${.CURDIR}/../../common/Makefile.inc"
67 CFLAGS+=        -I${.CURDIR}/../../common
68 CFLAGS+=        -I.
69
70 CLEANFILES+=    vers.c loader.help
71
72 CFLAGS+=        -ffreestanding -msoft-float
73 # load address. set in linker script
74 RELOC?=         0x1C00000
75 CFLAGS+=        -DRELOC=${RELOC}
76
77 LDFLAGS=        -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
78
79 # 64-bit bridge extensions
80 CFLAGS+= -Wa,-mppc64bridge
81
82 # Pull in common loader code
83 .PATH:          ${.CURDIR}/../../ofw/common
84 .include        "${.CURDIR}/../../ofw/common/Makefile.inc"
85
86 # Open Firmware standalone support library
87 LIBOFW=         ${.OBJDIR}/../../ofw/libofw/libofw.a
88 CFLAGS+=        -I${.CURDIR}/../../ofw/libofw
89
90 # where to get libstand from
91 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
92
93 DPADD=          ${LIBFICL} ${LIBOFW} ${LIBSTAND}
94 LDADD=          ${LIBFICL} ${LIBOFW} -lstand
95
96 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
97         sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
98
99 loader.help: help.common help.ofw
100         cat ${.ALLSRC} | \
101             awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
102
103 .PATH: ${.CURDIR}/../../forth
104 FILES=  loader.help loader.4th support.4th loader.conf
105 FILESDIR_loader.conf=   /boot/defaults
106
107 .if !exists(${DESTDIR}/boot/loader.rc)
108 FILES+= loader.rc
109 .endif
110
111 .include <bsd.prog.mk>