summaryrefslogtreecommitdiff
path: root/sys/arch/armish/stand/boot/Makefile
blob: b265ba3a7b56db70dccdf84ad5880656ab2abd29 (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
PROG=		boot

S=		${.CURDIR}/../../../..

CPPFLAGS+= 	-nostdinc -I../.. -I. -I${S} -D_STANDALONE
CPPFLAGS+=	-DCONSPEED=115200
CPPFLAGS+=	-DCONADDR=0xfe800000UL

COPTS+=		-ffreestanding -fno-stack-protector -malignment-traps

SRCS=		start.S boot.c conf.c clock.c ns16550.c wd.c wdc.c pciide.c
SRCS+=		devopen.c exec.c

### find out what to use for libkern
KERN_AS=        library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=        ${KERNLIB}

### find out what to use for libsa
SA_AS=          library
SAREL=
USE_LOADFILE=	yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=          ${SALIB}

LDFLAGS=	-T ${.CURDIR}/ldscript

${PROG}: ${OBJS} ${LIBKERN} ${LIBSA}
	${LD} ${LDFLAGS} -o boot ${OBJS} ${LIBSA} ${LIBKERN} ${LIBSA}

.if !make(obj)
.BEGIN:
	@([ -h machine ] || ln -s ${.CURDIR}/../../../${MACHINE}/include machine)
	@([ -h arm ] || ln -s ${.CURDIR}/../../../arm/include arm)
.NOPATH: machine arm
CLEANFILES+=	machine arm
.endif

.include <bsd.prog.mk>