xref: /freebsd/stand/powerpc/ofw/Makefile (revision 966e279052f33b1665480e0327c177013cb8205a)
1# $FreeBSD$
2
3LOADER_CD9660_SUPPORT?=	yes
4LOADER_EXT2FS_SUPPORT?=	no
5LOADER_MSDOS_SUPPORT?=	no
6LOADER_UFS_SUPPORT?=	yes
7LOADER_NET_SUPPORT?=	yes
8LOADER_NFS_SUPPORT?=	yes
9LOADER_TFTP_SUPPORT?=	no
10LOADER_GZIP_SUPPORT?=	yes
11LOADER_BZIP2_SUPPORT?=	no
12
13.include <bsd.init.mk>
14
15PROG=		loader
16NEWVERSWHAT=	"Open Firmware loader" ${MACHINE_ARCH}
17INSTALLFLAGS=	-b
18
19# Architecture-specific loader code
20SRCS=		conf.c vers.c main.c elf_freebsd.c ppc64_elf_freebsd.c start.c
21SRCS+=		ucmpdi2.c gfx_fb_stub.c
22
23CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken
24
25.include	"${BOOTSRC}/fdt.mk"
26.if ${MK_FDT} == "yes"
27SRCS+=		ofwfdt.c
28.endif
29
30.if ${MACHINE_ARCH:Mpowerpc64*} != ""
31SRCS+=		cas.c
32CFLAGS+=	-DCAS
33.endif
34
35.if ${MACHINE_ARCH} == "powerpc64le"
36SRCS+=		trampolineLE.S
37.endif
38
39HELP_FILES=	${FDTSRC}/help.fdt
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} ${LIBFDT} ${LIBSA}
63LDADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
64
65MK_PIE=		no
66
67.include <bsd.prog.mk>
68