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