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