From 840346e98717db548d164609737972dc6f03c43e Mon Sep 17 00:00:00 2001 From: ru Date: Mon, 30 Jun 2003 00:15:38 +0000 Subject: [PATCH] Revision 1.13, besides its useful part, replaced bsd.prog.mk by bsd.lib.mk and thus broke the build since AFLAGS were not taken into considered anymore, as bsd.lib.mk currently has wrong .s.o rule that uses cc(1) instead of as(1). Revision 1.14 reverted to using as(1), and revision 1.15 brought AFLAGS back to the business, but revision 1.14 also broke "make clean". To fix this, but not break anything that was fixed in revisions 1.13-1.15, we revert mostly to revision 1.13 except for switching back to using bsd.prog.mk. This gives us back the default .s.o rule from sys.mk that uses as(1), and fixes "make clean" by restoring the full contents of OBJS. Also fixed LDFLAGS. --- sys/boot/i386/kgzldr/Makefile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/boot/i386/kgzldr/Makefile b/sys/boot/i386/kgzldr/Makefile index 6207f7378270..7228a4f5da55 100644 --- a/sys/boot/i386/kgzldr/Makefile +++ b/sys/boot/i386/kgzldr/Makefile @@ -1,25 +1,19 @@ # $FreeBSD$ -SRCS= boot.c inflate.c lib.c +SRCS= start.s boot.c inflate.c lib.c crt.s sio.s OBJS= ${SRCS:N*.h:R:S/$/.o/g} CFLAGS= -ffreestanding CFLAGS+=-Os CFLAGS+=-DKZIP -LDFLAGS=-nostdlib -static -r +LDFLAGS=-nostdlib -static -Wl,-r .PATH: ${.CURDIR}/../../../kern -.for asm in start crt sio -OBJS+= ${asm}.o -${asm}.o: ${asm}.s - ${AS} ${AFLAGS} -o ${.TARGET} ${.ALLSRC:M*${asm}*} -.endfor - CLEANFILES=kgzldr.o BOOT_COMCONSOLE_PORT?= 0x3f8 AFLAGS+=--defsym SIO_PRT=${BOOT_COMCONSOLE_PORT} -all: ${OBJS} kgzldr.o +all: kgzldr.o kgzldr.o: ${OBJS} ${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} @@ -28,4 +22,4 @@ realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ kgzldr.o ${DESTDIR}${LIBDIR} -.include +.include