Makefile revision 41107
1285SN/A# $Id: Makefile,v 1.18 1998/11/04 03:42:36 msmith Exp $ 2462SN/A 3285SN/ABASE= loader 4285SN/APROG= ${BASE} 5285SN/ANOMAN= 6285SN/ASTRIP= 7285SN/ANEWVERSWHAT= "bootstrap loader" 8285SN/ABINDIR?= /boot 9285SN/A 10285SN/A# architecture-specific loader code 11285SN/ASRCS= main.c conf.c 12285SN/A 13285SN/A# Enable PnP and ISA-PnP code. 14285SN/AHAVE_PNP= yes 15285SN/AHAVE_ISABUS= yes 16285SN/A 17285SN/A# Enable BootForth 18285SN/ABOOT_FORTH= yes 19285SN/ACFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl 20285SN/A.if exists(${.OBJDIR}/../../ficl/libficl.a) 21285SN/ALIBFICL= ${.OBJDIR}/../../ficl/libficl.a 22285SN/A.else 23285SN/ALIBFICL= ${.CURDIR}/../../ficl/libficl.a 24285SN/A.endif 25285SN/A 26407SN/A# Always add MI sources 27285SN/A.PATH: ${.CURDIR}/../../common 28285SN/A.include <${.CURDIR}/../../common/Makefile.inc> 29285SN/ACFLAGS+= -I${.CURDIR}/../../common 30285SN/ACFLAGS+= -I${.CURDIR}/../../.. -I. 31285SN/A 32285SN/ACLEANFILES+= vers.c vers.o ${BASE}.list ${BASE}.bin ${BASE}.sym 33285SN/A 34285SN/ACFLAGS+= -Wall 35285SN/ALDFLAGS= -nostdlib -static -Ttext 0x1000 36285SN/A 37285SN/A# i386 standalone support library 38285SN/ALIBI386= ${.OBJDIR}/../libi386/libi386.a 39285SN/ACFLAGS+= -I${.CURDIR}/.. 40285SN/A 41285SN/A# where to get libstand from 42285SN/ALIBSTAND= -lstand 43285SN/A#LIBSTAND= ${.CURDIR}/../../../lib/libstand/libstand.a 44285SN/A#CFLAGS+= -I${.CURDIR}/../../../lib/libstand/ 45285SN/A 46285SN/A# BTX components 47285SN/A.if exists(${.OBJDIR}/../btx) 48285SN/ABTXDIR= ${.OBJDIR}/../btx 49285SN/A.else 50285SN/ABTXDIR= ${.CURDIR}/../btx 51285SN/A.endif 52285SN/ABTXLDR= ${BTXDIR}/btxldr/btxldr 53285SN/ABTXKERN= ${BTXDIR}/btx/btx 54285SN/ABTXCRT= ${BTXDIR}/lib/crt0.o 55285SN/ACFLAGS+= -I${.CURDIR}/../btx/lib 56285SN/A 57285SN/A# BTX is expecting ELF components 58285SN/ACFLAGS+= -elf 59285SN/A 60285SN/A# New linker set code 61285SN/ACFLAGS+= -DNEW_LINKER_SET 62285SN/A 63285SN/A# Debug me! 64285SN/A#CFLAGS+= -g 65285SN/A#LDFLAGS+= -g 66285SN/A 67285SN/Avers.o: 68285SN/A sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 69285SN/A ${CC} -c vers.c 70285SN/A 71285SN/A${BASE}: ${BASE}.bin ${BTXLDR} ${BTXKERN} ${BTXCRT} 72285SN/A btxld -v -f aout -e 0x100000 -o ${.TARGET} -l ${BTXLDR} -b ${BTXKERN} \ 73285SN/A ${BASE}.bin 74285SN/A 75285SN/A${BASE}.bin: ${BASE}.sym 76285SN/A cp ${.ALLSRC} ${.TARGET} 77285SN/A strip ${.TARGET} 78285SN/A 79285SN/A# Cannot use ${OBJS} above this line 80285SN/A.include <bsd.prog.mk> 81285SN/A 82285SN/A${BASE}.sym: ${OBJS} ${LIBI386} ${LIBSTAND} ${LIBFICL} vers.o 83285SN/A ${CC} ${LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} vers.o \ 84285SN/A ${LIBFICL} ${LIBSTAND} ${LIBI386} ${LIBSTAND} 85407SN/A 86285SN/A# If it's not there, don't consider it a target 87407SN/A.if exists(${.CURDIR}/../../../i386/include) 88285SN/Abeforedepend ${OBJS}: machine 89285SN/A 90285SN/Amachine: 91 ln -sf ${.CURDIR}/../../../i386/include machine 92 93.endif 94 95CLEANFILES+= machine 96 97 98