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