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