]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/i386/loader/Makefile
This commit was generated by cvs2svn to compensate for changes in r170242,
[FreeBSD/FreeBSD.git] / sys / boot / i386 / loader / Makefile
1 # $FreeBSD$
2
3 .include <bsd.own.mk>
4
5 PROG=           loader.sym
6 INTERNALPROG=
7 NEWVERSWHAT=    "bootstrap loader" i386
8
9 # architecture-specific loader code
10 SRCS=           main.c conf.c vers.c
11
12 # Put LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf for FireWire/dcons support
13 .if defined(LOADER_FIREWIRE_SUPPORT)
14 CFLAGS+=        -DLOADER_FIREWIRE_SUPPORT
15 LIBFIREWIRE=    ${.OBJDIR}/../libfirewire/libfirewire.a
16 .endif
17
18 # Enable PXE TFTP or NFS support, not both.
19 .if defined(LOADER_TFTP_SUPPORT)
20 CFLAGS+=        -DLOADER_TFTP_SUPPORT
21 .else
22 CFLAGS+=        -DLOADER_NFS_SUPPORT
23 .endif
24
25 # Include bcache code.
26 HAVE_BCACHE=    yes
27
28 # Enable PnP and ISA-PnP code.
29 HAVE_PNP=       yes
30 HAVE_ISABUS=    yes
31
32 .if ${MK_FORTH} != "no"
33 # Enable BootForth
34 BOOT_FORTH=     yes
35 CFLAGS+=        -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
36 LIBFICL=        ${.OBJDIR}/../../ficl/libficl.a
37 .endif
38
39 .if defined(LOADER_BZIP2_SUPPORT)
40 CFLAGS+=        -DLOADER_BZIP2_SUPPORT
41 .endif
42 .if !defined(LOADER_NO_GZIP_SUPPORT)
43 CFLAGS+=        -DLOADER_GZIP_SUPPORT
44 .endif
45
46 # Always add MI sources 
47 .PATH:          ${.CURDIR}/../../common
48 .include        "${.CURDIR}/../../common/Makefile.inc"
49 CFLAGS+=        -I${.CURDIR}/../../common
50 CFLAGS+=        -I.
51
52 CLEANFILES=     vers.c loader loader.bin loader.help
53
54 CFLAGS+=        -Wall
55 LDFLAGS=        -static -Ttext 0x0
56
57 # i386 standalone support library
58 LIBI386=        ${.OBJDIR}/../libi386/libi386.a
59 CFLAGS+=        -I${.CURDIR}/..
60
61 # BTX components
62 CFLAGS+=        -I${.CURDIR}/../btx/lib
63
64 # Debug me!
65 #CFLAGS+=       -g
66 #LDFLAGS+=      -g
67
68 # Pick up ../Makefile.inc early.
69 .include <bsd.init.mk>
70
71 vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
72         sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
73
74 loader: loader.bin ${BTXLDR} ${BTXKERN}
75         btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
76                 -b ${BTXKERN} loader.bin
77
78 loader.bin: loader.sym
79         cp ${.ALLSRC} ${.TARGET}
80         strip -R .comment -R .note ${.TARGET}
81
82 loader.help: help.common help.i386
83         cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
84
85 .PATH: ${.CURDIR}/../../forth 
86 FILES=  loader loader.help loader.4th support.4th loader.conf
87 FILES+= screen.4th frames.4th beastie.4th
88 # XXX INSTALLFLAGS_loader= -b
89 FILESMODE_loader= ${BINMODE} -b
90 FILESDIR_loader.conf=   /boot/defaults
91
92 .if !exists(${DESTDIR}/boot/loader.rc)
93 FILES+= loader.rc
94 .endif
95
96 # XXX crt0.o needs to be first for pxeboot(8) to work
97 OBJS=   ${BTXCRT} 
98
99 DPADD=  ${LIBFICL} ${LIBFIREWIRE} ${LIBI386} ${LIBSTAND}
100 LDADD=  ${LIBFICL} ${LIBFIREWIRE} ${LIBI386} -lstand
101
102 .include <bsd.prog.mk>
103
104 .if ${MACHINE_ARCH} == "amd64"
105 beforedepend ${OBJS}: machine
106 CLEANFILES+=    machine
107 machine:
108         ln -sf ${.CURDIR}/../../../i386/include machine
109 .endif