blob: 96f5792c2527daec7e7f5a7533337e4b6812c4f7 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# $OpenBSD: Makefile,v 1.2 2007/11/26 08:36:49 deraadt Exp $
NOMAN= no man
S =${.CURDIR}/../../../..
CLEANFILES+= cdboot.gdb cdboot.map
.if ${MACHINE} == "hppa64"
PROG= cdboot
.PATH: ${.CURDIR}/../boot
SRCS+= srt0.S
SRCS= srt0.S cdboot.c
.PATH: ${.CURDIR}/../libsa
SRCS+= pdc.c itecons.c dev_hppa64.c dk.c
.PATH: ${S}/lib/libkern/arch/hppa ${S}/lib/libkern
SRCS+= milli.S strlen.c strlcpy.c
LD?= ld
LDFLAGS+=-Bstatic -nostartfiles -nostdlib -N -Ttext $(LINKADDR)
LDFLAGS+=-T ${.CURDIR}/ld.script -Map cdboot.map
SIZE?= size
STRIP?= strip
STANDIR=${.CURDIR}/..
CRTBEGIN=
CRTEND=
SAREL=
USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
DPADD+= $(SALIB)
LDADD+= $(SALIB)
all: ${PROG}
clean::
rm -f a.out [Ee]rrs mklog core *.core \
${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}
realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${PROG} ${DESTDIR}${BINDIR}
# TODO check for <=32k
${PROG}: $(OBJS) $(DPADD)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
@cp ${PROG} ${PROG}.gdb
${STRIP} ${PROG}
@${SIZE} $(PROG)
@${MKBOOT} -v ${PROG} ${PROG}.lif
@mv ${PROG}.lif ${PROG}
.else
NOPROG=
.endif
.include <bsd.prog.mk>
CPPFLAGS+=-DRELOC=${LOADADDR} -DHEAP_LIMIT=${HEAP_LIMIT}
CFLAGS+=$(SACFLAGS) -I../.. -I${.CURDIR}/../libsa -I${S}/stand/boot
|