blob: 06c3d12b69891bc1b8bc6f4648515bf2838962e4 (
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
|
# $OpenBSD: Makefile,v 1.2 1997/07/21 06:58:11 pefo Exp $
PROG=boot
SADIR=${.CURDIR}/..
SRCS=start.S boot.c filesystem.c conf.c sd.c fl.c
CFLAGS+=$(SACFLAGS) -I${.CURDIR}/../../../../lib/libsa -I${.CURDIR}/../libsa
CFLAGS+=-D__INTERNAL_LIBSA_CREAD
LD=ld
LDFLAGS+= -T ld.script -x -e __start
LDADD= ${LIBSA}
all: machine-links boot.bin
machine-links:
@rm -f machine wgrisc
@ln -fs ${.CURDIR}/../.. wgrisc
@ln -fs ${.CURDIR}/../../include machine
${PROG}: $(OBJS) $(LDADD)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
${PROG}.bin: ${PROG}
cp ${PROG} ${PROG}.tmp
strip -s ${PROG}.tmp
dd if=${PROG}.tmp of=${PROG}.bin bs=512 skip=8 count=1
dd if=/dev/zero of=${PROG}.bin bs=512 seek=1 count=1
dd if=${PROG}.tmp of=${PROG}.bin bs=512 skip=9 seek=2 count=14
rm ${PROG}.tmp
.include <bsd.prog.mk>
|