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.
This commit is contained in:
Ruslan Ermilov 2003-06-30 00:15:38 +00:00
parent 82a6d6aca5
commit 40205a0623

View File

@ -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 <bsd.lib.mk>
.include <bsd.prog.mk>