No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / prep / stand / boot / Makefile
blob673ae4ab576b6b1d9bff0046f848ca79bcd71d7d
1 # $NetBSD: Makefile,v 1.22 2007/12/19 18:28:50 garbled Exp $
3 NOMAN= # defined
5 .include <bsd.own.mk>
7 COMMON= ${.CURDIR}/../common
8 COMMONOBJ!= cd ${COMMON} && ${PRINTOBJDIR}
10 .PATH: ${.CURDIR}/../boot ${COMMONOBJ}
12 S= ${.CURDIR}/../../../..
13 L= ${COMMONOBJ}/lib
15 MKBOOTIMAGE= ${.CURDIR}/../../../powerpc/stand/mkbootimage
17 BASE?= boot
18 PROG= ${BASE}
19 NEWVERSWHAT= "BOOT"
21 SRCS= srt0.s
22 SRCS+= boot.c clock.c com.c conf.c cons.c devopen.c
23 SRCS+= filesystem.c inkernel.c io.c tgets.c prf.c monitor.c
24 SRCS+= kbd.c ns16550.c vers.c vreset.c vga.c
26 CFLAGS= -Os -mmultiple -ffreestanding
27 CFLAGS+= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
28 AFLAGS= -x assembler-with-cpp -traditional-cpp
30 CPPFLAGS= -nostdinc -I${.OBJDIR} -I${MKBOOTIMAGE} -I${S}
31 CPPFLAGS+= -D_STANDALONE -DRELOC=${RELOC} -DUSE_SCAN
32 CPPFLAGS+= -D__daddr_t=int32_t
33 #CPPFLAGS+= -DDBMONITOR
35 .if (${BASE} == "boot")
36 CPPFLAGS+= -DCONS_VGA -DVGA_RESET
37 .elif (${BASE} == "boot_com0")
38 CPPFLAGS+= -DCONS_SERIAL -DCOMSPEED=9600 -DCOMPORT=0x3f8
39 .elif (${BASE} == "boot_com0_vreset")
40 CPPFLAGS+= -DCONS_SERIAL -DCOMSPEED=9600 -DCOMPORT=0x3f8 -DVGA_RESET
41 .endif
43 STRIPFLAG=
44 BINMODE= 444
46 # XXX SHOULD NOT NEED TO DEFINE THESE!
47 LIBCRT0=
48 LIBC=
49 LIBCRTBEGIN=
50 LIBCRTEND=
52 RELOC= 0x800000
54 CLEANFILES+= vers.c machine powerpc ${PROG}.elf
56 LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
58 .if !make(obj) && !make(clean) && !make(cleandir)
59 .BEGIN: machine powerpc
60 .NOPATH: machine powerpc
62 machine::
63 -rm -f $@
64 ln -s ${S}/arch/${MACHINE}/include $@
66 powerpc::
67 -rm -f $@
68 ln -s ${S}/arch/powerpc/include $@
69 .endif
71 vers.c: ${.CURDIR}/../boot/version
72 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/../boot/version "prep" ${NEWVERSWHAT}
74 ${PROG}: ${OBJS} ${LIBS}
75 ${LD} -o ${PROG}.elf -N -T ${.CURDIR}/../boot/ld.script \
76 -Ttext ${RELOC} ${OBJS} ${LIBS}
77 ${STRIP} -o ${PROG} ${PROG}.elf
79 .include <bsd.prog.mk>