xref: /freebsd/stand/powerpc/ofw/Makefile (revision 8859960436f5727f163a7b3468e08710c5e6d874)
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
40HELP_FILENAME=	loader.help.ofw
41
42# Always add MI sources
43.include	"${BOOTSRC}/loader.mk"
44
45.PATH:		${SYSDIR}/libkern
46
47# load address. set in linker script
48RELOC?=		0x1C00000
49CFLAGS+=	-DRELOC=${RELOC} -g
50
51LDFLAGS=	-nostdlib -static
52
53.if ${MACHINE_ARCH} == "powerpc64le"
54LDFLAGS+=	-T ${.CURDIR}/ldscript.powerpcle
55.else
56LDFLAGS+=	-T ${.CURDIR}/ldscript.powerpc
57.endif
58
59# Open Firmware standalone support library
60LIBOFW=		${BOOTOBJ}/libofw/libofw.a
61CFLAGS+=	-I${BOOTSRC}/libofw
62
63DPADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
64LDADD=		${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
65
66MK_PIE=		no
67
68.include <bsd.prog.mk>
69