Makefile revision 146874
11553Srgrimes# $FreeBSD: head/sys/boot/i386/loader/Makefile 146874 2005-06-01 15:32:57Z obrien $ 21553Srgrimes 31553SrgrimesPROG= loader.sym 41553SrgrimesINTERNALPROG= 51553SrgrimesNEWVERSWHAT= "bootstrap loader" i386 61553Srgrimes 71553Srgrimes# architecture-specific loader code 81553SrgrimesSRCS= main.c conf.c vers.c 91553Srgrimes 101553Srgrimes# Enable PXE TFTP or NFS support, not both. 111553Srgrimes.if defined(LOADER_TFTP_SUPPORT) 121553SrgrimesCFLAGS+= -DLOADER_TFTP_SUPPORT 13121300Sphk.else 141553SrgrimesCFLAGS+= -DLOADER_NFS_SUPPORT 151553Srgrimes.endif 161553Srgrimes 171553Srgrimes# Enable PnP and ISA-PnP code. 181553SrgrimesHAVE_PNP= yes 191553SrgrimesHAVE_ISABUS= yes 201553Srgrimes 211553Srgrimes.if !defined(NO_FORTH) 221553Srgrimes# Enable BootForth 231553SrgrimesBOOT_FORTH= yes 241553SrgrimesCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 251553SrgrimesLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 261553Srgrimes.endif 271553Srgrimes 281553Srgrimes.if defined(LOADER_BZIP2_SUPPORT) 291553SrgrimesCFLAGS+= -DLOADER_BZIP2_SUPPORT 30114601Sobrien.endif 311553Srgrimes.if !defined(LOADER_NO_GZIP_SUPPORT) 321553SrgrimesCFLAGS+= -DLOADER_GZIP_SUPPORT 33114601Sobrien.endif 3430027Scharnier 35114601Sobrien# Always add MI sources 36114601Sobrien.PATH: ${.CURDIR}/../../common 371553Srgrimes.include "${.CURDIR}/../../common/Makefile.inc" 381553SrgrimesCFLAGS+= -I${.CURDIR}/../../common 391553SrgrimesCFLAGS+= -I. 40121853Sbde 41121853SbdeCLEANFILES= vers.c loader loader.bin loader.help 4230027Scharnier 4330027ScharnierCFLAGS+= -Wall 441553SrgrimesLDFLAGS= -static -Ttext 0x0 451553Srgrimes 4644303Swollman# i386 standalone support library 4730027ScharnierLIBI386= ${.OBJDIR}/../libi386/libi386.a 4844303SwollmanCFLAGS+= -I${.CURDIR}/.. 49121853Sbde 50121853Sbde# BTX components 51121853SbdeCFLAGS+= -I${.CURDIR}/../btx/lib 5244303Swollman 5344303Swollman# Debug me! 5444303Swollman#CFLAGS+= -g 55144295Stobez#LDFLAGS+= -g 56144295Stobez 57144295Stobez# Pick up ../Makefile.inc early. 58100070Sdes.include <bsd.init.mk> 591553Srgrimes 601553Srgrimesvers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version 611553Srgrimes sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 62121853Sbde 63121853Sbdeloader: loader.bin ${BTXLDR} ${BTXKERN} 641553Srgrimes btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 651553Srgrimes -b ${BTXKERN} loader.bin 661553Srgrimes 671553Srgrimesloader.bin: loader.sym 681553Srgrimes cp ${.ALLSRC} ${.TARGET} 691553Srgrimes strip -R .comment -R .note ${.TARGET} 7066584Sphk 7166584Sphkloader.help: help.common help.i386 721553Srgrimes cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 731553Srgrimes 741553Srgrimes.PATH: ${.CURDIR}/../../forth 75121299SphkFILES= loader loader.help loader.4th support.4th loader.conf 761553SrgrimesFILES+= screen.4th frames.4th 77121853Sbde# XXX INSTALLFLAGS_loader= -b 78112214SrobertFILESMODE_loader= ${BINMODE} -b 791553SrgrimesFILESDIR_loader.conf= /boot/defaults 80112214Srobert 8199802Salfred.if !exists(${DESTDIR}/boot/loader.rc) 8299802SalfredFILES+= loader.rc 8361749Sjoe.endif 841553Srgrimes 851553Srgrimes# XXX crt0.o needs to be first for pxeboot(8) to work 861553SrgrimesOBJS= ${BTXCRT} 871553Srgrimes 881553SrgrimesDPADD= ${LIBFICL} ${LIBI386} ${LIBSTAND} 891553SrgrimesLDADD= ${LIBFICL} ${LIBI386} -lstand 901553Srgrimes 911553Srgrimes.include <bsd.prog.mk> 921553Srgrimes 931553Srgrimes.if ${MACHINE_ARCH} == "amd64" 941553Srgrimesbeforedepend ${OBJS}: machine 951553SrgrimesCLEANFILES+= machine 961553Srgrimesmachine: 971553Srgrimes ln -sf ${.CURDIR}/../../../i386/include machine 981553Srgrimes.endif 991553Srgrimes