blob: c8a74c4f6dacf69403db7f462aef30cee3a8c208 (
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
63
64
65
66
67
68
69
70
71
72
73
|
# $NetBSD: Makefile,v 1.18 2020/06/03 11:33:38 tsutsui Exp $
.include <bsd.init.mk>
S!= cd ${.CURDIR}/../../../..; pwd
PROG= boot
MKMAN= no # defined
STRIPFLAG=
BINMODE= 444
NETBSD_VERS!= ${HOST_SH} ${S}/conf/osrelease.sh
.PATH: ${S}/dev/arcbios
SRCS= start.S arcbios_calls.S
SRCS+= boot.c bootinfo.c conf.c devopen.c disk.c getchar.c getopt.c putchar.c
.include "${S}/dev/arcbios/Makefile.inc"
# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBCRTI=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=
AFLAGS= -x assembler-with-cpp -mno-abicalls -mips2 -mabi=32
AFLAGS+= -D_LOCORE -D_KERNEL
CFLAGS= -Os -mmemcpy -G 1024
CFLAGS+= -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32
CFLAGS+= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CPPFLAGS+= -nostdinc -I. -I${S}
CPPFLAGS+= -D_STANDALONE -DNO_ABICALLS -D${MACHINE}
CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
#CPPFLAGS+= -DBOOT_DEBUG
LDSCRIPT= ${S}/arch/mips/conf/stand.ldscript
TEXTADDR= 0x80f00000
LD+= -m elf32ltsmip
### find out what to use for libsa
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA= ${SALIB}
### find out what to use for libkern
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN= ${KERNLIB}
### find out what to use for libz
.include "${S}/lib/libz/Makefile.inc"
LIBZ= ${ZLIB}
LIBS= ${LIBSA} ${LIBKERN} ${LIBZ}
cleandir distclean: .WAIT cleanlibdir
cleanlibdir:
-rm -rf lib
${PROG}: ${OBJS} ${LIBS}
${LD} -Map ${PROG}.map -N -x -Ttext ${TEXTADDR} -T ${LDSCRIPT} \
-e start -o ${PROG}.elf ${OBJS} ${LIBS}
@${SIZE} ${PROG}.elf
${OBJCOPY} --impure -O ecoff-littlemips \
-R .pdr -R .mdebug.abi32 -R .comment -R .ident --strip-debug \
${PROG}.elf ${.TARGET}
CLEANFILES+= ${PROG}.elf ${PROG}.map
.include "${S}/conf/newvers_stand.mk"
.include <bsd.klinks.mk>
.include <bsd.prog.mk>
|