Makefile revision 56994
150477Speter# $FreeBSD: head/sys/boot/pc98/loader/Makefile 56994 2000-02-05 02:21:31Z kato $ 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 1543561SkatoSRCS= main.c conf.c 1643561Skato.PATH: ${.CURDIR}/../../i386/loader 1743561Skato 1843561Skato# Enable PnP and ISA-PnP code. 1943561SkatoHAVE_PNP= yes 2043561SkatoHAVE_ISABUS= yes 2143561Skato 2256994Skato.if !defined(NOFORTH) 2343561Skato# Enable BootForth 2443561SkatoBOOT_FORTH= yes 2553688SnyanCFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 2643561Skato.if exists(${.OBJDIR}/../../ficl/libficl.a) 2743561SkatoLIBFICL= ${.OBJDIR}/../../ficl/libficl.a 2843561Skato.else 2943561SkatoLIBFICL= ${.CURDIR}/../../ficl/libficl.a 3043561Skato.endif 3156994Skato.endif 3243561Skato 3343561Skato# Always add MI sources 3443561Skato.PATH: ${.CURDIR}/../../common 3543561Skato.include <${.CURDIR}/../../common/Makefile.inc> 3643561SkatoCFLAGS+= -I${.CURDIR}/../../common 3743561SkatoCFLAGS+= -I${.CURDIR}/../../.. -I. -I${.CURDIR}/../../i386 3843561Skato 3943561SkatoCLEANFILES+= vers.c vers.o ${BASE}.list ${BASE}.bin ${BASE}.sym ${BASE}.help 4043561Skato 4143561SkatoCFLAGS+= -Wall 4244255SkatoLDFLAGS= -nostdlib -static -Ttext 0x0 4343561Skato 4443561Skato# pc98 standalone support library 4543561SkatoLIBPC98= ${.OBJDIR}/../libpc98/libpc98.a 4643561SkatoCFLAGS+= -I${.CURDIR}/.. 4743561Skato 4843561Skato# where to get libstand from 4943561SkatoLIBSTAND= -lstand 5043561Skato#LIBSTAND= ${.CURDIR}/../../../lib/libstand/libstand.a 5143561Skato#CFLAGS+= -I${.CURDIR}/../../../lib/libstand/ 5243561Skato 5343561Skato# BTX components 5443561Skato.if exists(${.OBJDIR}/../btx) 5543561SkatoBTXDIR= ${.OBJDIR}/../btx 5643561Skato.else 5743561SkatoBTXDIR= ${.CURDIR}/../btx 5843561Skato.endif 5943561SkatoBTXLDR= ${BTXDIR}/btxldr/btxldr 6043561SkatoBTXKERN= ${BTXDIR}/btx/btx 6143561SkatoBTXCRT= ${BTXDIR}/lib/crt0.o 6243561SkatoCFLAGS+= -I${.CURDIR}/../btx/lib 6343561Skato 6443561Skato# BTX is expecting ELF components 6543561SkatoCFLAGS+= -elf 6643561Skato 6743561Skato# New linker set code 6843561SkatoCFLAGS+= -DNEW_LINKER_SET 6943561Skato 7043561Skato# Debug me! 7143561Skato#CFLAGS+= -g 7243561Skato#LDFLAGS+= -g 7343561Skato 7448351Spetervers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version 7548351Speter sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT} 7643561Skato ${CC} -c vers.c 7743561Skato 7843561Skato${BASE}: ${BASE}.bin ${BTXLDR} ${BTXKERN} ${BTXCRT} ${BASE}.help 7943561Skato btxld -v -f aout -e 0x100000 -o ${.TARGET} -l ${BTXLDR} -b ${BTXKERN} \ 8043561Skato ${BASE}.bin 8143561Skato# /usr/bin/kzip ${.TARGET} 8243561Skato# mv ${.TARGET}.kz ${.TARGET} 8343561Skato 8443561Skato${BASE}.bin: ${BASE}.sym 8543561Skato cp ${.ALLSRC} ${.TARGET} 8643561Skato strip ${.TARGET} 8743561Skato 8845241Skato${BASE}.help: help.common help.i386 8943561Skato cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} 9043561Skato 9143561Skatobeforeinstall: 9243561Skato.if exists(${DESTDIR}/boot/loader) 9343561Skato mv ${DESTDIR}/boot/loader ${DESTDIR}/boot/loader.old 9443561Skato.endif 9543561Skato.if exists(${.OBJDIR}/loader.help) 9643561Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 9743561Skato ${.OBJDIR}/${BASE}.help ${DESTDIR}/boot 9843561Skato.else 9943561Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 10043561Skato ${.CURDIR}/${BASE}.help ${DESTDIR}/boot 10143561Skato.endif 10253206Snyan.if !exists(${DESTDIR}/boot/loader.rc) 10344630Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 10453206Snyan ${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot 10553206Snyan.endif 10653206Snyan ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 10744630Skato ${.CURDIR}/../../forth/loader.4th ${DESTDIR}/boot 10844630Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 10944630Skato ${.CURDIR}/../../forth/support.4th ${DESTDIR}/boot 11044630Skato ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 11144630Skato ${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults 11243561Skato 11343561Skato# Cannot use ${OBJS} above this line 11443561Skato.include <bsd.prog.mk> 11543561Skato 11643561Skato${BASE}.sym: ${OBJS} ${LIBPC98} ${LIBSTAND} ${LIBFICL} vers.o 11743561Skato ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} vers.o \ 11843561Skato ${LIBFICL} ${LIBSTAND} ${LIBPC98} ${LIBSTAND} 11943561Skato 12043561Skato# If it's not there, don't consider it a target 12143561Skato.if exists(${.CURDIR}/../../../i386/include) 12243561Skatobeforedepend ${OBJS}: machine 12343561Skato 12443561Skatomachine: 12543561Skato ln -sf ${.CURDIR}/../../../i386/include machine 12643561Skato 12743561Skato.endif 12843561Skato 12943561SkatoCLEANFILES+= machine 13043561Skato 13143561Skato 132