summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/kgzldr/Makefile
blob: fff828b69c1c1a6a1c95aeea361ff0a9eeeee185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# $FreeBSD$

SRCS=	boot.c inflate.c lib.c
OBJS=	${SRCS:N*.h:R:S/$/.o/g}
CFLAGS=	-ffreestanding
CFLAGS+=-Os
CFLAGS+=-DKZIP
LDFLAGS=-nostdlib -static -r
.PATH:	${.CURDIR}/../../../kern

.for asm in start crt sio
OBJS+=	${asm}.o
${asm}.o: ${asm}.s
	as -o ${.TARGET} ${.ALLSRC:M*${asm}*}
.endfor

CLEANFILES=kgzldr.o

BOOT_COMCONSOLE_PORT?=	0x3f8
AFLAGS+=--defsym SIO_PRT=${BOOT_COMCONSOLE_PORT}

all: ${OBJS} kgzldr.o

kgzldr.o: ${OBJS}
	${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS}

realinstall:
	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
	    kgzldr.o ${DESTDIR}${LIBDIR}

.include <bsd.lib.mk>
OpenPOWER on IntegriCloud