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