Makefile revision 59535
150477Speter# $FreeBSD: head/sys/boot/pc98/loader/Makefile 59535 2000-04-23 09:33:31Z nyan $ 243561Skato 343561SkatoBASE= loader 443561SkatoPROG= ${BASE} 546043SkatoMAN5= ../../forth/loader.conf.5 646043SkatoMAN8= ../../i386/loader/loader.8 ../../forth/loader.4th.8 744859Skato#NOMAN= 843561SkatoSTRIP= 948351SpeterNEWVERSWHAT= "bootstrap loader" pc98 1043561SkatoBINDIR?= /boot 1143561Skato 1243561SkatoCFLAGS+= -DPC98 1343561Skato 1443561Skato# architecture-specific loader code 1559535SnyanSRCS= main.c conf.c 1658871Skato.PATH: ${.CURDIR}/../../i386/loader ${.CURDIR}/../../i386/libi386 1743561Skato 1859228Snyan# Enable PXE TFTP or NFS support, not both. 1959228SnyanCFLAGS+= -DLOADER_NFS_SUPPORT 2059228Snyan#CFLAGS+= -DLOADER_TFTP_SUPPORT 2159228Snyan 2243561Skato# Enable PnP and ISA-PnP code. 2343561SkatoHAVE_PNP= yes 2443561SkatoHAVE_ISABUS= yes 2543561Skato 2656994Skato.if !defined(NOFORTH) 2743561Skato# Enable BootForth 2843561SkatoBOOT_FORTH= yes 2953688SnyanCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 3043561Skato.if exists(${.OBJDIR}/../../ficl/libficl.a) 3143561SkatoLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 3243561Skato.else 3343561SkatoLIBFICL= ${.CURDIR}/../../ficl/libficl.a 3443561Skato.endif 3556994Skato.endif 3643561Skato 3743561Skato# Always add MI sources 3843561Skato.PATH: ${.CURDIR}/../../common 3943561Skato.include <${.CURDIR}/../../common/Makefile.inc> 4043561SkatoCFLAGS+= -I${.CURDIR}/../../common 4143561SkatoCFLAGS+= -I${.CURDIR}/../../.. -I. -I${.CURDIR}/../../i386 4243561Skato 4343561SkatoCLEANFILES+= vers.c vers.o ${BASE}.list ${BASE}.bin ${BASE}.sym ${BASE}.help 4443561Skato 4543561SkatoCFLAGS+= -Wall 4644255SkatoLDFLAGS= -nostdlib -static -Ttext 0x0 4743561Skato 4843561Skato# pc98 standalone support library 4943561SkatoLIBPC98= ${.OBJDIR}/../libpc98/libpc98.a 5043561SkatoCFLAGS+= -I${.CURDIR}/.. 5143561Skato 5243561Skato# where to get libstand from 5343561SkatoLIBSTAND= -lstand 5459228Snyan#LIBSTAND= ${.CURDIR}/../../../../lib/libstand/libstand.a 5559228SnyanCFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ 5643561Skato 5743561Skato# BTX components 5843561Skato.if exists(${.OBJDIR}/../btx) 5943561SkatoBTXDIR= ${.OBJDIR}/../btx 6043561Skato.else 6143561SkatoBTXDIR= ${.CURDIR}/../btx 6243561Skato.endif 6343561SkatoBTXLDR= ${BTXDIR}/btxldr/btxldr 6443561SkatoBTXKERN= ${BTXDIR}/btx/btx 6543561SkatoBTXCRT= ${BTXDIR}/lib/crt0.o 6643561SkatoCFLAGS+= -I${.CURDIR}/../btx/lib 6743561Skato 6843561Skato# BTX is expecting ELF components 6943561SkatoCFLAGS+= -elf 7043561Skato 7143561Skato# New linker set code 7243561SkatoCFLAGS+= -DNEW_LINKER_SET 7343561Skato 7443561Skato# Debug me! 7543561Skato#CFLAGS+= -g 7643561Skato#LDFLAGS+= -g 7743561Skato 7848351Spetervers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version 7948351Speter sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT} 8043561Skato ${CC} -c vers.c 8143561Skato 8243561Skato${BASE}: ${BASE}.bin ${BTXLDR} ${BTXKERN} ${BTXCRT} ${BASE}.help 8358871Skato btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 8458871Skato -b ${BTXKERN} ${BASE}.bin 8543561Skato# /usr/bin/kzip ${.TARGET} 8643561Skato# mv ${.TARGET}.kz ${.TARGET} 8743561Skato 8843561Skato${BASE}.bin: ${BASE}.sym 8943561Skato cp ${.ALLSRC} ${.TARGET} 9043561Skato strip ${.TARGET} 9143561Skato 9245241Skato${BASE}.help: help.common help.i386 9343561Skato cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 9443561Skato 9543561Skatobeforeinstall: 9643561Skato.if exists(${DESTDIR}/boot/loader) 9743561Skato mv ${DESTDIR}/boot/loader ${DESTDIR}/boot/loader.old 9843561Skato.endif 9943561Skato.if exists(${.OBJDIR}/loader.help) 10043561Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 10143561Skato ${.OBJDIR}/${BASE}.help ${DESTDIR}/boot 10243561Skato.else 10343561Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 10443561Skato ${.CURDIR}/${BASE}.help ${DESTDIR}/boot 10543561Skato.endif 10653206Snyan.if !exists(${DESTDIR}/boot/loader.rc) 10744630Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 10853206Snyan ${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot 10953206Snyan.endif 11053206Snyan ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 11144630Skato ${.CURDIR}/../../forth/loader.4th ${DESTDIR}/boot 11244630Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 11344630Skato ${.CURDIR}/../../forth/support.4th ${DESTDIR}/boot 11444630Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 11544630Skato ${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults 11643561Skato 11758871Skato.include <${.CURDIR}/../Makefile.inc> 11858871Skato 11943561Skato# Cannot use ${OBJS} above this line 12043561Skato.include <bsd.prog.mk> 12143561Skato 12243561Skato${BASE}.sym: ${OBJS} ${LIBPC98} ${LIBSTAND} ${LIBFICL} vers.o 12343561Skato ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} vers.o \ 12459535Snyan ${LIBFICL} ${LIBPC98} ${LIBSTAND} 12543561Skato 12643561Skato# If it's not there, don't consider it a target 12743561Skato.if exists(${.CURDIR}/../../../i386/include) 12843561Skatobeforedepend ${OBJS}: machine 12943561Skato 13043561Skatomachine: 13143561Skato ln -sf ${.CURDIR}/../../../i386/include machine 13243561Skato 13343561Skato.endif 13443561Skato 13543561SkatoCLEANFILES+= machine 136