]> CyberLeo.Net >> Repos - FreeBSD/releng/8.0.git/blob - sys/boot/powerpc/ofw/Makefile
Adjust to reflect 8.0-RELEASE.
[FreeBSD/releng/8.0.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 # Always add MI sources
60 .PATH:          ${.CURDIR}/../../common
61 .include        "${.CURDIR}/../../common/Makefile.inc"
62 CFLAGS+=        -I${.CURDIR}/../../common
63 CFLAGS+=        -I.
64
65 CLEANFILES+=    vers.c loader.help
66
67 CFLAGS+=        -ffreestanding -msoft-float
68 # load address. set in linker script
69 RELOC?=         0x1C00000
70 CFLAGS+=        -DRELOC=${RELOC}
71
72 LDFLAGS=        -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
73
74 # 64-bit bridge extensions
75 CFLAGS+= -Wa,-mppc64bridge
76
77 # Pull in common loader code
78 .PATH:          ${.CURDIR}/../../ofw/common
79 .include        "${.CURDIR}/../../ofw/common/Makefile.inc"
80
81 # Open Firmware standalone support library
82 LIBOFW=         ${.OBJDIR}/../../ofw/libofw/libofw.a
83 CFLAGS+=        -I${.CURDIR}/../../ofw/libofw
84
85 # where to get libstand from
86 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
87
88 DPADD=          ${LIBFICL} ${LIBOFW} ${LIBSTAND}
89 LDADD=          ${LIBFICL} ${LIBOFW} -lstand
90
91 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
92         sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
93
94 loader.help: help.common help.ofw
95         cat ${.ALLSRC} | \
96             awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
97
98 .PATH: ${.CURDIR}/../../forth
99 FILES=  loader.help loader.4th support.4th loader.conf
100 FILESDIR_loader.conf=   /boot/defaults
101
102 .if !exists(${DESTDIR}/boot/loader.rc)
103 FILES+= loader.rc
104 .endif
105
106 .include <bsd.prog.mk>