1# $FreeBSD: head/sys/boot/pc98/loader/Makefile 125563 2004-02-07 12:19:44Z nyan $ |
2 |
3NEWVERSWHAT= "bootstrap loader" pc98 |
4 5CFLAGS+= -DPC98 6 7# architecture-specific loader code |
8SRCS= main.c conf.c vers.c |
9.PATH: ${.CURDIR}/../../i386/loader 10 11CFLAGS+= -ffreestanding 12# Enable PXE TFTP or NFS support, not both. 13.if defined(LOADER_TFTP_SUPPORT) 14CFLAGS+= -DLOADER_TFTP_SUPPORT 15.else 16CFLAGS+= -DLOADER_NFS_SUPPORT --- 18 unchanged lines hidden (view full) --- 35CFLAGS+= -DLOADER_BZIP2_SUPPORT 36.endif 37.if !defined(LOADER_NO_GZIP_SUPPORT) 38CFLAGS+= -DLOADER_GZIP_SUPPORT 39.endif 40 41# Always add MI sources 42.PATH: ${.CURDIR}/../../common |
43.include "${.CURDIR}/../../common/Makefile.inc" |
44CFLAGS+= -I${.CURDIR}/../../common |
45CFLAGS+= -I${.CURDIR}/../../i386 46CFLAGS+= -I. |
47 |
48CLEANFILES= vers.c loader loader.list loader.bin loader.sym loader.help |
49 50CFLAGS+= -Wall 51LDFLAGS= -nostdlib -static -Ttext 0x0 52 53# pc98 standalone support library 54LIBPC98= ${.OBJDIR}/../libpc98/libpc98.a 55CFLAGS+= -I${.CURDIR}/.. 56 |
57# BTX components |
58CFLAGS+= -I${.CURDIR}/../btx/lib 59 60# BTX is expecting ELF components 61CFLAGS+= -elf 62 63# Debug me! 64#CFLAGS+= -g 65#LDFLAGS+= -g 66 |
67# Pick up ../Makefile.inc early. 68.include <bsd.init.mk> 69 70vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version |
71 sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT} |
72 |
73loader: loader.bin ${BTXLDR} ${BTXKERN} ${BTXCRT} |
74 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ |
75 -b ${BTXKERN} loader.bin |
76# /usr/bin/kzip ${.TARGET} 77# mv ${.TARGET}.kz ${.TARGET} 78 |
79loader.bin: loader.sym |
80 cp ${.ALLSRC} ${.TARGET} 81 strip -R .comment -R .note ${.TARGET} 82 |
83loader.help: help.common help.pc98 |
84 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 85 86.PATH: ${.CURDIR}/../../forth |
87FILES= loader loader.help loader.4th support.4th loader.conf |
88FILES+= screen.4th frames.4th beastie.4th |
89# XXX INSTALLFLAGS_loader= -b 90FILESMODE_loader= ${BINMODE} -b |
91FILESDIR_loader.conf= /boot/defaults 92 93.if !exists(${DESTDIR}/boot/loader.rc) 94FILES+= ${.CURDIR}/../../i386/loader/loader.rc 95.endif 96 |
97OBJS= ${SRCS:N*.h:R:S/$/.o/g} |
98 |
99loader.sym: ${OBJS} ${LIBFICL} ${LIBPC98} ${LIBSTAND} 100 ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} \ |
101 ${LIBFICL} ${LIBPC98} ${LIBSTAND} 102 |
103.include <bsd.prog.mk> |