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