]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/powerpc/ps3/Makefile
Update the GNU DTS file from Linux 4.11
[FreeBSD/FreeBSD.git] / sys / boot / powerpc / ps3 / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4 MK_SSP=         no
5 MAN=
6
7 PROG=           loader.ps3
8 NEWVERSWHAT=    "Playstation 3 loader" ${MACHINE_ARCH}
9 BINDIR?=        /boot
10 INSTALLFLAGS=   -b
11
12 # Architecture-specific loader code
13 SRCS=           start.S conf.c metadata.c vers.c main.c devicename.c ppc64_elf_freebsd.c
14 SRCS+=          lv1call.S ps3cons.c font.h ps3mmu.c ps3net.c ps3repo.c \
15                 ps3stor.c ps3disk.c ps3cdrom.c
16 SRCS+=          ucmpdi2.c
17
18 LOADER_DISK_SUPPORT?=   yes
19 LOADER_UFS_SUPPORT?=    yes
20 LOADER_CD9660_SUPPORT?= yes
21 LOADER_EXT2FS_SUPPORT?= yes
22 LOADER_NET_SUPPORT?=    yes
23 LOADER_NFS_SUPPORT?=    yes
24 LOADER_TFTP_SUPPORT?=   no
25 LOADER_GZIP_SUPPORT?=   yes
26 LOADER_FDT_SUPPORT?=    no
27 LOADER_BZIP2_SUPPORT?=  no
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
64 .if ${MK_FORTH} != "no"
65 # Enable BootForth
66 BOOT_FORTH=     yes
67 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl
68 CFLAGS+=        -I${.CURDIR}/../../ficl/powerpc
69 LIBFICL=        ${.OBJDIR}/../../ficl/libficl.a
70 .endif
71
72 CFLAGS+=        -mcpu=powerpc64
73
74 # Always add MI sources
75 .PATH:          ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
76 .include        "${.CURDIR}/../../common/Makefile.inc"
77 CFLAGS+=        -I${.CURDIR}/../../common -I${.CURDIR}/../../..
78 CFLAGS+=        -I.
79
80 CLEANFILES+=    loader.help
81
82 CFLAGS+=        -Wall -ffreestanding -msoft-float -DAIM
83 # load address. set in linker script
84 RELOC?=         0x0
85 CFLAGS+=        -DRELOC=${RELOC}
86
87 LDFLAGS=        -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
88
89 # Pull in common loader code
90 #.PATH:         ${.CURDIR}/../../ofw/common
91 #.include       "${.CURDIR}/../../ofw/common/Makefile.inc"
92
93 # where to get libstand from
94 LIBSTAND=       ${.OBJDIR}/../../libstand32/libstand.a
95 CFLAGS+=        -I${.CURDIR}/../../../../lib/libstand/
96
97 DPADD=          ${LIBFICL} ${LIBOFW} ${LIBSTAND}
98 LDADD=          ${LIBFICL} ${LIBOFW} ${LIBSTAND}
99
100 SC_DFLT_FONT=cp437
101
102 font.h:
103         uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
104
105 loader.help: help.common help.ps3 ${.CURDIR}/../../fdt/help.fdt
106         cat ${.ALLSRC} | \
107             awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
108
109 .PATH: ${.CURDIR}/../../forth
110 .include        "${.CURDIR}/../../forth/Makefile.inc"
111
112 FILES+= loader.rc menu.rc
113
114 .include <bsd.prog.mk>