d1bdfb40fd
(also resort some CFLAGS such that the more "important" value are first so they are easier to see)
36 lines
681 B
Makefile
36 lines
681 B
Makefile
# $FreeBSD$
|
|
|
|
FILES= kgzldr.o
|
|
SRCS= start.s boot.c inflate.c lib.c crt.s sio.s
|
|
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
|
CFLAGS= -ffreestanding
|
|
.if ${OBJFORMAT} == aout
|
|
CFLAGS+=-O2
|
|
.else
|
|
CFLAGS+=-Os
|
|
.endif
|
|
CFLAGS+=-DKZIP
|
|
LDFLAGS=-nostdlib -static -r
|
|
BINDIR= /usr/lib
|
|
.PATH: ${.CURDIR}/../../../kern
|
|
|
|
.PATH: ${.CURDIR}/../../i386/kgzldr
|
|
AFLAGS+=--defsym PC98=1
|
|
|
|
CLEANFILES=${FILES}
|
|
|
|
M4?= m4
|
|
M4FLAGS=-DOBJFORMAT=${OBJFORMAT}
|
|
|
|
BOOT_COMCONSOLE_PORT?= 0x238
|
|
M4FLAGS+=-DSIOPRT=${BOOT_COMCONSOLE_PORT}
|
|
|
|
kgzldr.o: ${OBJS}
|
|
${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS}
|
|
|
|
.s.o:
|
|
(cd ${.CURDIR}; ${M4} ${M4FLAGS} ../../i386/kgzldr/kgzldr.m4 ${.IMPSRC}) |\
|
|
${AS} ${AFLAGS} -o ${.TARGET}
|
|
|
|
.include <bsd.prog.mk>
|