1 # $FreeBSD: src/sys/boot/sparc64/loader/Makefile,v 1.15 2002/12/20 04:32:10 jake Exp $
2 # $DragonFly: src/sys/boot/sparc64/loader/Makefile,v 1.2 2005/07/07 11:49:57 corecode Exp $
7 NEWVERSWHAT
= "bootstrap loader" sparc64
11 # Architecture-specific loader code
12 SRCS
= locore.S main.c metadata.c vers.c
14 LOADER_DISK_SUPPORT?
= yes
15 LOADER_UFS_SUPPORT?
= yes
16 LOADER_CD9660_SUPPORT?
= yes
17 LOADER_NET_SUPPORT?
= yes
18 LOADER_NFS_SUPPORT?
= yes
19 LOADER_TFTP_SUPPORT?
= yes
20 LOADER_GZIP_SUPPORT?
= yes
21 LOADER_BZIP2_SUPPORT?
= no
23 .if
${LOADER_DISK_SUPPORT} == "yes"
24 CFLAGS
+= -DLOADER_DISK_SUPPORT
26 .if
${LOADER_UFS_SUPPORT} == "yes"
27 CFLAGS
+= -DLOADER_UFS_SUPPORT
29 .if
${LOADER_CD9660_SUPPORT} == "yes"
30 CFLAGS
+= -DLOADER_CD9660_SUPPORT
32 .if
${LOADER_GZIP_SUPPORT} == "yes"
33 CFLAGS
+= -DLOADER_GZIP_SUPPORT
35 .if
${LOADER_BZIP2_SUPPORT} == "yes"
36 CFLAGS
+= -DLOADER_BZIP2_SUPPORT
38 .if
${LOADER_NET_SUPPORT} == "yes"
39 CFLAGS
+= -DLOADER_NET_SUPPORT
41 .if
${LOADER_NFS_SUPPORT} == "yes"
42 CFLAGS
+= -DLOADER_NFS_SUPPORT
44 .if
${LOADER_TFTP_SUPPORT} == "yes"
45 CFLAGS
+= -DLOADER_TFTP_SUPPORT
51 CFLAGS
+= -DBOOT_FORTH
-I
${.CURDIR
}/..
/..
/ficl
-I
${.CURDIR
}/..
/..
/ficl
/sparc64
52 .if exists
(${.OBJDIR
}/..
/..
/ficl
/libficl.a
)
53 LIBFICL
= ${.OBJDIR
}/..
/..
/ficl
/libficl.a
55 LIBFICL
= ${.CURDIR
}/..
/..
/ficl
/libficl.a
59 # Always add MI sources
60 .PATH
: ${.CURDIR
}/..
/..
/common
61 .
include <${.CURDIR
}/..
/..
/common
/Makefile.inc
>
62 CFLAGS
+= -I
${.CURDIR
}/..
/..
/common
63 CFLAGS
+= -I
${.CURDIR
}/..
/..
/..
-I.
65 CLEANFILES
+= vers.c
${BASE}.help
67 CFLAGS
+= -ffreestanding
68 LDFLAGS
= -nostdlib
-static
70 # Openfirmware standalone support library
71 LIBOFW
= ${.OBJDIR
}/..
/..
/ofw
/libofw
/libofw.a
72 CFLAGS
+= -I
${.CURDIR
}/..
/..
/ofw
/libofw
/
74 # where to get libstand from
75 #XXX need a better way to do this
76 LIBSTAND
= ${.CURDIR
}/..
/..
/..
/..
/lib
/libstand
/libstand.a
77 .if
!exists
(${LIBSTAND})
78 LIBSTAND
= ${.OBJDIR
}/..
/..
/..
/..
/lib
/libstand
/libstand.a
79 .if
!exists
(${LIBSTAND})
83 CFLAGS
+= -I
${.CURDIR
}/..
/..
/..
/..
/lib
/libstand
/
85 LDADD
= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
87 vers.c
: ${.CURDIR
}/..
/..
/common
/newvers.sh
${.CURDIR
}/version
88 sh
${.CURDIR
}/..
/..
/common
/newvers.sh
${.CURDIR
}/version
${NEWVERSWHAT}
90 ${BASE}.help
: help.common help.sparc64
92 awk
-f
${.CURDIR
}/..
/..
/common
/merge_help.awk
> ${.TARGET
}
94 .PATH
: ${.CURDIR
}/..
/..
/forth
95 FILES
= ${BASE}.help loader
.4th support
.4th loader.conf
96 FILESDIR_loader.conf
= /boot
/defaults
98 .if
!exists
(${DESTDIR}/boot
/loader.rc
)
102 # There are no things relevant to all boot parts of FreeBSD/sparc64 yet.
103 #.include <${.CURDIR}/../Makefile.inc>
105 .
include <bsd.prog.mk
>
107 .if exists
(${.CURDIR
}/..
/..
/..
/sparc64
/include)
108 beforedepend
${OBJS}: machine
111 ${LN} -sf
${.CURDIR
}/..
/..
/..
/sparc64
/include machine