xref: /freebsd/stand/powerpc/ofw/Makefile (revision 069ac18495ad8fde2748bc94b0f80a50250bb01d)
1
2LOADER_CD9660_SUPPORT?=	yes
3LOADER_EXT2FS_SUPPORT?=	no
4LOADER_MSDOS_SUPPORT?=	no
5LOADER_UFS_SUPPORT?=	yes
6LOADER_NET_SUPPORT?=	yes
7LOADER_NFS_SUPPORT?=	yes
8LOADER_TFTP_SUPPORT?=	no
9LOADER_GZIP_SUPPORT?=	yes
10LOADER_BZIP2_SUPPORT?=	no
11
12.include <bsd.init.mk>
13
14PROG=		loader
15NEWVERSWHAT=	"Open Firmware loader" ${MACHINE_ARCH}
16INSTALLFLAGS=	-b
17
18# Architecture-specific loader code
19SRCS=		conf.c vers.c main.c elf_freebsd.c ppc64_elf_freebsd.c start.c
20SRCS+=		ucmpdi2.c gfx_fb_stub.c
21
22CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken
23
24.include	"${BOOTSRC}/fdt.mk"
25.if ${MK_FDT} == "yes"
26SRCS+=		ofwfdt.c
27.endif
28
29.if ${MACHINE_ARCH:Mpowerpc64*} != ""
30SRCS+=		cas.c
31CFLAGS+=	-DCAS
32.endif
33
34.if ${MACHINE_ARCH} == "powerpc64le"
35SRCS+=		trampolineLE.S
36.endif
37
38HELP_FILES=	${FDTSRC}/help.fdt
39HELP_FILENAME=	loader.help.ofw
40
41# Always add MI sources
42.include	"${BOOTSRC}/loader.mk"
43
44.PATH:		${SYSDIR}/libkern
45
46# load address. set in linker script
47RELOC?=		0x1C00000
48CFLAGS+=	-DRELOC=${RELOC} -g
49
50LDFLAGS=	-nostdlib -static
51
52.if ${MACHINE_ARCH} == "powerpc64le"
53LDFLAGS+=	-T ${.CURDIR}/ldscript.powerpcle
54.else
55LDFLAGS+=	-T ${.CURDIR}/ldscript.powerpc
56.endif
57
58# Open Firmware standalone support library
59LIBOFW=		${BOOTOBJ}/libofw/libofw.a
60CFLAGS+=	-I${BOOTSRC}/libofw
61
62DPADD=		${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA}
63LDADD=		${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA}
64
65MK_PIE=		no
66
67.include <bsd.prog.mk>
68