Makefile revision 360838
1237069Simp# $FreeBSD: stable/11/stand/i386/isoboot/Makefile 360838 2020-05-09 08:55:18Z dim $ 2237069Simp 3237069Simp.include <bsd.init.mk> 4237069Simp 5237069Simp.PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/gptboot \ 6237069Simp ${BOOTSRC}/i386/common ${SASRC} 7237069Simp 8237069SimpFILES= isoboot 9237069SimpMAN= isoboot.8 10237069Simp 11237069SimpBOOT_COMCONSOLE_PORT?= 0x3f8 12237069SimpBOOT_COMCONSOLE_SPEED?= 9600 13237069SimpB2SIOFMT?= 0x3 14237069Simp 15237069SimpREL1= 0x700 16237069SimpORG1= 0x7c00 17237069SimpORG2= 0x0 18237069Simp 19237069SimpISOBOOTSIZE?= 30720 20237069Simp 21237069SimpCFLAGS+=-DBOOTPROG=\"isoboot\" \ 22237069Simp -O1 \ 23237069Simp -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ 24237069Simp -DSIOFMT=${B2SIOFMT} \ 25237069Simp -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \ 26237069Simp -I${LDRSRC} \ 27237069Simp -I${BOOTSRC}/i386/common \ 28237069Simp -I${BOOTSRC}/i386/boot2 \ 29237069Simp -Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \ 30237069Simp -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ 31237069Simp -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ 32237069Simp -Winline -Wno-pointer-sign 33237069Simp 34237069SimpCFLAGS.gcc+= --param max-inline-insns-single=100 35237069Simp.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 36237069SimpCFLAGS.gcc+= -Wno-uninitialized 37237069Simp.endif 38237069SimpCFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} 39237069Simp 40237069SimpLD_FLAGS+=${LD_FLAGS_BIN} 41237069Simp 42237069SimpCLEANFILES+= isoboot 43237069Simp 44237069Simpisoboot: gptldr.bin isoboot.bin ${BTXKERN} 45237069Simp btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \ 46237069Simp -o ${.TARGET} isoboot.bin 47237069Simp @set -- `ls -l ${.TARGET}`; x=$$((${ISOBOOTSIZE}-$$5)); \ 48237069Simp echo "$$x bytes available"; test $$x -ge 0 49237069Simp 50237069SimpCLEANFILES+= gptldr.bin gptldr.out gptldr.o 51237069Simp 52237069Simpgptldr.bin: gptldr.out 53237069Simp ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} 54237069Simp 55237069Simpgptldr.out: gptldr.o 56237069Simp ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o 57237069Simp 58237069SimpCLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o crc32.o drv.o \ 59237069Simp cons.o ${OPENCRYPTO_XTS} 60237069Simp 61237069Simpisoboot.bin: isoboot.out 62237069Simp ${OBJCOPY} -S -O binary isoboot.out ${.TARGET} 63237069Simp 64237069Simpisoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} 65237069Simp ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} 66237069Simp 67290648Smmel.include <bsd.prog.mk> 68237069Simp