aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/userboot/userboot/Makefile
blob: aad2e0f83c3473e8d51f003286700d9a39e5ad56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# $FreeBSD$

NO_MAN=

.include <bsd.own.mk>
MK_SSP=		no

SHLIB_NAME=	userboot.so
NO_CTF=		yes
STRIP=
LIBDIR=		/boot

SRCS=		autoload.c
SRCS+=		biossmap.c
SRCS+=		bootinfo.c
SRCS+=		bootinfo32.c
SRCS+=		bootinfo64.c
SRCS+=		conf.c
SRCS+=		console.c
SRCS+=		copy.c
SRCS+=		devicename.c
SRCS+=		elf32_freebsd.c
SRCS+=		elf64_freebsd.c
SRCS+=		host.c
SRCS+=		main.c
SRCS+=		userboot_cons.c
SRCS+=		userboot_disk.c
SRCS+=		vers.c

CFLAGS+=	-Wall
CFLAGS+=	-I${.CURDIR}/..
CFLAGS+=	-I${.CURDIR}/../../common
CFLAGS+=	-I${.CURDIR}/../../..
CFLAGS+=	-I${.CURDIR}/../../../../lib/libstand
CFLAGS+=	-ffreestanding -I.

LDFLAGS+=	-nostdlib -Wl,-Bsymbolic

NEWVERSWHAT=	"User boot" ${MACHINE_CPUARCH}

vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}

CLEANFILES=	vers.c

.if ${MK_FORTH} != "no"
BOOT_FORTH=	yes
CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
CFLAGS+=	-DBF_DICTSIZE=15000
LIBFICL=	${.OBJDIR}/../ficl/libficl.a
LIBSTAND=	${.OBJDIR}/../libstand/libstand.a
.endif

.if ${MK_ZFS} != "no"
CFLAGS+=	-DUSERBOOT_ZFS_SUPPORT
LIBZFSBOOT=	${.OBJDIR}/../zfs/libzfsboot.a
.endif

# Always add MI sources 
.PATH:		${.CURDIR}/../../common
.include	"${.CURDIR}/../../common/Makefile.inc"
CFLAGS+=	-I${.CURDIR}/../../common
CFLAGS+=	-I.
DPADD+=		${LIBFICL} ${LIBZFSBOOT} ${LIBSTAND} 
LDADD+=		${LIBFICL} ${LIBZFSBOOT} ${LIBSTAND}

.include <bsd.lib.mk>