Makefile (125581) | Makefile (125621) |
---|---|
1# $FreeBSD: head/sys/boot/i386/loader/Makefile 125581 2004-02-07 23:30:45Z ru $ | 1# $FreeBSD: head/sys/boot/i386/loader/Makefile 125621 2004-02-09 14:11:58Z ru $ |
2 | 2 |
3PROG= loader.sym 4INTERNALPROG= |
|
3NEWVERSWHAT= "bootstrap loader" i386 4 5# architecture-specific loader code 6SRCS= main.c conf.c vers.c 7 8# Enable PXE TFTP or NFS support, not both. 9.if defined(LOADER_TFTP_SUPPORT) 10CFLAGS+= -DLOADER_TFTP_SUPPORT --- 4 unchanged lines hidden (view full) --- 15# Enable PnP and ISA-PnP code. 16HAVE_PNP= yes 17HAVE_ISABUS= yes 18 19.if !defined(NOFORTH) 20# Enable BootForth 21BOOT_FORTH= yes 22CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 | 5NEWVERSWHAT= "bootstrap loader" i386 6 7# architecture-specific loader code 8SRCS= main.c conf.c vers.c 9 10# Enable PXE TFTP or NFS support, not both. 11.if defined(LOADER_TFTP_SUPPORT) 12CFLAGS+= -DLOADER_TFTP_SUPPORT --- 4 unchanged lines hidden (view full) --- 17# Enable PnP and ISA-PnP code. 18HAVE_PNP= yes 19HAVE_ISABUS= yes 20 21.if !defined(NOFORTH) 22# Enable BootForth 23BOOT_FORTH= yes 24CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 |
23.if exists(${.OBJDIR}/../../ficl/libficl.a) | |
24LIBFICL= ${.OBJDIR}/../../ficl/libficl.a | 25LIBFICL= ${.OBJDIR}/../../ficl/libficl.a |
25.else 26LIBFICL= ${.CURDIR}/../../ficl/libficl.a | |
27.endif | 26.endif |
28.endif | |
29 30.if defined(LOADER_BZIP2_SUPPORT) 31CFLAGS+= -DLOADER_BZIP2_SUPPORT 32.endif 33.if !defined(LOADER_NO_GZIP_SUPPORT) 34CFLAGS+= -DLOADER_GZIP_SUPPORT 35.endif 36 37# Always add MI sources 38.PATH: ${.CURDIR}/../../common 39.include "${.CURDIR}/../../common/Makefile.inc" 40CFLAGS+= -I${.CURDIR}/../../common 41CFLAGS+= -I. 42 | 27 28.if defined(LOADER_BZIP2_SUPPORT) 29CFLAGS+= -DLOADER_BZIP2_SUPPORT 30.endif 31.if !defined(LOADER_NO_GZIP_SUPPORT) 32CFLAGS+= -DLOADER_GZIP_SUPPORT 33.endif 34 35# Always add MI sources 36.PATH: ${.CURDIR}/../../common 37.include "${.CURDIR}/../../common/Makefile.inc" 38CFLAGS+= -I${.CURDIR}/../../common 39CFLAGS+= -I. 40 |
43CLEANFILES= vers.c loader loader.list loader.bin loader.sym loader.help | 41CLEANFILES= vers.c loader loader.list loader.bin loader.help |
44 45CFLAGS+= -Wall | 42 43CFLAGS+= -Wall |
46LDFLAGS= -nostdlib -static -Ttext 0x0 | 44LDFLAGS= -static -Ttext 0x0 |
47 48# i386 standalone support library 49LIBI386= ${.OBJDIR}/../libi386/libi386.a 50CFLAGS+= -I${.CURDIR}/.. 51 52# BTX components 53CFLAGS+= -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 62vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 63 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 64 | 45 46# i386 standalone support library 47LIBI386= ${.OBJDIR}/../libi386/libi386.a 48CFLAGS+= -I${.CURDIR}/.. 49 50# BTX components 51CFLAGS+= -I${.CURDIR}/../btx/lib 52 53# Debug me! 54#CFLAGS+= -g 55#LDFLAGS+= -g 56 57# Pick up ../Makefile.inc early. 58.include <bsd.init.mk> 59 60vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 61 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 62 |
65loader: loader.bin ${BTXLDR} ${BTXKERN} ${BTXCRT} | 63loader: loader.bin ${BTXLDR} ${BTXKERN} |
66 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 67 -b ${BTXKERN} loader.bin 68# /usr/bin/kzip ${.TARGET} 69# mv ${.TARGET}.kz ${.TARGET} 70 71loader.bin: loader.sym 72 cp ${.ALLSRC} ${.TARGET} 73 strip -R .comment -R .note ${.TARGET} --- 7 unchanged lines hidden (view full) --- 81# XXX INSTALLFLAGS_loader= -b 82FILESMODE_loader= ${BINMODE} -b 83FILESDIR_loader.conf= /boot/defaults 84 85.if !exists(${DESTDIR}/boot/loader.rc) 86FILES+= ${.CURDIR}/loader.rc 87.endif 88 | 64 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 65 -b ${BTXKERN} loader.bin 66# /usr/bin/kzip ${.TARGET} 67# mv ${.TARGET}.kz ${.TARGET} 68 69loader.bin: loader.sym 70 cp ${.ALLSRC} ${.TARGET} 71 strip -R .comment -R .note ${.TARGET} --- 7 unchanged lines hidden (view full) --- 79# XXX INSTALLFLAGS_loader= -b 80FILESMODE_loader= ${BINMODE} -b 81FILESDIR_loader.conf= /boot/defaults 82 83.if !exists(${DESTDIR}/boot/loader.rc) 84FILES+= ${.CURDIR}/loader.rc 85.endif 86 |
89OBJS= ${SRCS:N*.h:R:S/$/.o/g} | 87DPADD= ${BTXCRT} ${LIBFICL} ${LIBI386} ${LIBSTAND} 88LDADD= ${BTXCRT} ${LIBFICL} ${LIBI386} -lstand |
90 | 89 |
91loader.sym: ${OBJS} ${LIBFICL} ${LIBI386} ${LIBSTAND} 92 ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} \ 93 ${LIBFICL} ${LIBI386} ${LIBSTAND} | 90.include <bsd.prog.mk> |
94 95.if ${MACHINE_ARCH} == "amd64" 96beforedepend ${OBJS}: machine 97CLEANFILES+= machine 98machine: 99 ln -sf ${.CURDIR}/../../../i386/include machine 100.endif | 91 92.if ${MACHINE_ARCH} == "amd64" 93beforedepend ${OBJS}: machine 94CLEANFILES+= machine 95machine: 96 ln -sf ${.CURDIR}/../../../i386/include machine 97.endif |
101 102.include <bsd.prog.mk> | |