No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / bebox / stand / boot / Makefile
blobe615fb3ac8b3dbfe8c927e5f0fcb2f91fd6409fb
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} ${.CURDIR}/../../../powerpc/powerpc
12 S= ${.CURDIR}/../../../..
13 L= ${COMMONOBJ}/lib
15 ELF2PEF= ${.CURDIR}/../../../powerpc/stand/mkbootimage
17 COMMONLIBDIR= ${.CURDIR}/../../../../../common
19 BASE?= boot
20 PROG= ${BASE}
21 NEWVERSWHAT= "BOOT"
23 SRCS= srt0.s
24 SRCS+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c
25 SRCS+= fd.c filesystem.c inkernel.c io.c kbd.c monitor.c ns16550.c
26 SRCS+= prf.c tgets.c vers.c vga.c video.c vreset.c
27 SRCS+= setjmp.S
29 CFLAGS= -Wno-main -ffreestanding
30 AFLAGS= -x assembler-with-cpp -traditional-cpp
32 CPPFLAGS= -nostdinc -I${.OBJDIR} -I${ELF2PEF} -I${S} -I${COMMONLIBDIR}/include
33 CPPFLAGS+= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
34 CPPFLAGS+= -D_STANDALONE -DRELOC=${RELOC} -DUSE_SCAN
35 CPPFLAGS+= -D__daddr_t=int32_t
36 #CPPFLAGS+= -DDBMONITOR
38 .if (${BASE} == "boot")
39 CPPFLAGS+= -DCONS_BE
40 .elif (${BASE} == "boot_com0")
41 CPPFLAGS+= -DCONS_SERIAL -DCOMSPEED=9600 -DCOMPORT=0x3f8
42 .elif (${BASE} == "boot_vga")
43 CPPFLAGS+= -DCONS_VGA
44 .endif
46 STRIPFLAG=
47 BINMODE= 444
49 # XXX SHOULD NOT NEED TO DEFINE THESE!
50 LIBCRT0=
51 LIBC=
52 LIBCRTBEGIN=
53 LIBCRTEND=
55 RELOC= 0x700000
57 CLEANFILES+= vers.c machine powerpc ${PROG}.elf
59 LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
61 .if !make(obj) && !make(clean) && !make(cleandir)
62 .BEGIN: machine powerpc
63 .NOPATH: machine powerpc
65 machine::
66 -rm -f $@
67 ln -s ${S}/arch/${MACHINE}/include $@
69 powerpc::
70 -rm -f $@
71 ln -s ${S}/arch/powerpc/include $@
72 .endif
74 vers.c: ${.CURDIR}/../boot/version
75 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/../boot/version \
76 "bebox" ${NEWVERSWHAT}
78 ${PROG}: ${OBJS} ${LIBS}
79 ${LD} -o ${PROG}.elf -N -T ${.CURDIR}/../boot/ld.script \
80 -Ttext ${RELOC} ${OBJS} ${LIBS}
81 ${STRIP} -o ${PROG} ${PROG}.elf
83 .include <bsd.prog.mk>