]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - sys/boot/powerpc/uboot/Makefile
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / sys / boot / powerpc / uboot / Makefile
1 # $FreeBSD$
2
3 .include <bsd.own.mk>
4
5 PROG=           ubldr
6 NEWVERSWHAT=    "U-Boot loader" ${MACHINE_ARCH}
7 BINDIR?=        /boot
8 INSTALLFLAGS=   -b
9 NO_MAN=
10
11 # Architecture-specific loader code
12 SRCS=           start.S conf.c vers.c
13 SRCS+=          ucmpdi2.c
14
15 LOADER_DISK_SUPPORT?=   yes
16 LOADER_UFS_SUPPORT?=    yes
17 LOADER_CD9660_SUPPORT?= no
18 LOADER_EXT2FS_SUPPORT?= no
19 LOADER_NET_SUPPORT?=    yes
20 LOADER_NFS_SUPPORT?=    yes
21 LOADER_TFTP_SUPPORT?=   no
22 LOADER_GZIP_SUPPORT?=   no
23 LOADER_BZIP2_SUPPORT?=  no
24 .if ${MK_FDT} != "no"
25 LOADER_FDT_SUPPORT=     yes
26 .else
27 LOADER_FDT_SUPPORT=     no
28 .endif
29
30 .if ${LOADER_DISK_SUPPORT} == "yes"
31 CFLAGS+=        -DLOADER_DISK_SUPPORT
32 .endif
33 .if ${LOADER_UFS_SUPPORT} == "yes"
34 CFLAGS+=        -DLOADER_UFS_SUPPORT
35 .endif
36 .if ${LOADER_CD9660_SUPPORT} == "yes"
37 CFLAGS+=        -DLOADER_CD9660_SUPPORT
38 .endif
39 .if ${LOADER_EXT2FS_SUPPORT} == "yes"
40 CFLAGS+=        -DLOADER_EXT2FS_SUPPORT
41 .endif
42 .if ${LOADER_GZIP_SUPPORT} == "yes"
43 CFLAGS+=        -DLOADER_GZIP_SUPPORT
44 .endif
45 .if ${LOADER_BZIP2_SUPPORT} == "yes"
46 CFLAGS+=        -DLOADER_BZIP2_SUPPORT
47 .endif
48 .if ${LOADER_NET_SUPPORT} == "yes"
49 CFLAGS+=        -DLOADER_NET_SUPPORT
50 .endif
51 .if ${LOADER_NFS_SUPPORT} == "yes"
52 CFLAGS+=        -DLOADER_NFS_SUPPORT
53 .endif
54 .if ${LOADER_TFTP_SUPPORT} == "yes"
55 CFLAGS+=        -DLOADER_TFTP_SUPPORT
56 .endif
57 .if ${LOADER_FDT_SUPPORT} == "yes"
58 CFLAGS+=        -I${.CURDIR}/../../fdt
59 CFLAGS+=        -I${.OBJDIR}/../../fdt
60 CFLAGS+=        -DLOADER_FDT_SUPPORT
61 LIBFDT=         ${.OBJDIR}/../../fdt/libfdt.a
62 .endif
63
64 .if !defined(NO_FORTH)
65 # Enable BootForth
66 BOOT_FORTH=     yes
67 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
68 LIBFICL=        ${.OBJDIR}/../../ficl/libficl.a
69 .endif
70
71 # Always add MI sources
72 .PATH:          ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
73 .include        "${.CURDIR}/../../common/Makefile.inc"
74 CFLAGS+=        -I${.CURDIR}/../../common -I${.CURDIR}/../../..
75 CFLAGS+=        -I.
76
77 CLEANFILES+=    vers.c ${PROG}.help
78
79 CFLAGS+=        -ffreestanding
80
81 LDFLAGS=        -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
82
83 # Pull in common loader code
84 .PATH:          ${.CURDIR}/../../uboot/common
85 .include        "${.CURDIR}/../../uboot/common/Makefile.inc"
86 CFLAGS+=        -I${.CURDIR}/../../uboot/common
87
88 # U-Boot standalone support library
89 LIBUBOOT=       ${.OBJDIR}/../../uboot/lib/libuboot.a
90 CFLAGS+=        -I${.CURDIR}/../../uboot/lib
91 CFLAGS+=        -I${.OBJDIR}/../../uboot/lib
92
93 # where to get libstand from
94 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
95
96 DPADD=          ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND}
97 LDADD=          ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand
98
99 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
100         sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
101
102 loader.help: help.common help.uboot
103         cat ${.ALLSRC} | \
104             awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
105
106 .PATH: ${.CURDIR}/../../forth
107 FILES=  loader.help
108
109 .include <bsd.prog.mk>