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