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