No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / arc / stand / boot / Makefile
blob2821286c7581ffcc5bda764c5ddb07f68d145178
1 # $NetBSD: Makefile,v 1.7 2009/03/15 13:57:57 tsutsui Exp $
3 .include <bsd.own.mk>
4 .include <bsd.sys.mk> # for ${HOST_SH}
6 S!= cd ${.CURDIR}/../../../..; pwd
8 PROG= boot
9 MKMAN= no # defined
10 STRIPFLAG=
11 BINMODE= 444
13 NETBSD_VERS!= ${HOST_SH} ${S}/conf/osrelease.sh
15 SRCS= start.S
16 SRCS+= boot.c bootinfo.c conf.c devopen.c disk.c getchar.c getopt.c putchar.c
18 # XXX SHOULD NOT NEED TO DEFINE THESE!
19 LIBCRT0=
20 LIBC=
21 LIBCRTBEGIN=
22 LIBCRTEND=
24 AFLAGS= -x assembler-with-cpp -traditional-cpp -mno-abicalls -mips2
25 AFLAGS+= -D_LOCORE -D_KERNEL
26 CFLAGS= -Os -mmemcpy -G 1024
27 CFLAGS+= -ffreestanding -mno-abicalls -msoft-float -mips2
28 CFLAGS+= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
29 CPPFLAGS+= -nostdinc -I. -I${S}
30 CPPFLAGS+= -D_STANDALONE -DNO_ABICALLS -D${MACHINE}
31 CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
32 #CPPFLAGS+= -DBOOT_DEBUG
33 LDSCRIPT= ${S}/arch/mips/conf/stand.ldscript
34 TEXTADDR= 0x80f00000
36 # if there is a 'version' file, add rule for vers.c and add it to SRCS
37 # and CLEANFILES
38 .if exists(version)
39 .PHONY: vers.c
40 vers.c: ${.CURDIR}/version
41 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE}
43 SRCS+= vers.c
44 CLEANFILES+= vers.c
45 .endif
47 ### find out what to use for libsa
48 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
49 .include "${S}/lib/libsa/Makefile.inc"
50 LIBSA= ${SALIB}
52 ### find out what to use for libkern
53 .include "${S}/lib/libkern/Makefile.inc"
54 LIBKERN= ${KERNLIB}
56 ### find out what to use for libz
57 .include "${S}/lib/libz/Makefile.inc"
58 LIBZ= ${ZLIB}
60 LIBS= ${LIBSA} ${LIBKERN} ${LIBZ}
62 cleandir distclean: cleanlibdir
63 cleanlibdir:
64 -rm -rf lib
66 ${PROG}: ${OBJS} ${LIBS}
67 ${LD} -Map ${PROG}.map -N -x -Ttext ${TEXTADDR} -T ${LDSCRIPT} \
68 -e start -o ${PROG}.elf ${OBJS} ${LIBS}
69 @${SIZE} ${PROG}.elf
70 ${OBJCOPY} --impure -O ecoff-littlemips \
71 -R .pdr -R .mdebug.abi32 -R .comment -R .ident \
72 ${PROG}.elf ${.TARGET}
74 CLEANFILES+= ${PROG}.elf ${PROG}.map
76 .include <bsd.klinks.mk>
77 .include <bsd.prog.mk>