NetBSD/sys/arch/bebox/stand/boot/Makefile

86 lines
2.0 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.31 2011/01/22 19:19:16 joerg Exp $
1998-01-16 07:07:35 +03:00
NOMAN= # defined
1998-01-16 07:07:35 +03:00
.include <bsd.own.mk>
1998-01-16 07:07:35 +03:00
COMMON= ${.CURDIR}/../common
COMMONOBJ!= cd ${COMMON} && ${PRINTOBJDIR}
.PATH: ${.CURDIR}/../boot ${COMMONOBJ} ${.CURDIR}/../../../powerpc/powerpc
S= ${.CURDIR}/../../../..
L= ${COMMONOBJ}/lib
ELF2PEF= ${.CURDIR}/../../../powerpc/stand/mkbootimage
1998-01-16 07:07:35 +03:00
COMMONLIBDIR= ${.CURDIR}/../../../../../common
BASE?= boot
PROG= ${BASE}
NEWVERSWHAT= "BOOT"
1998-01-16 07:07:35 +03:00
SRCS= srt0.s
SRCS+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c
SRCS+= fd.c filesystem.c inkernel.c io.c kbd.c monitor.c ns16550.c
SRCS+= pci.c prf.c sd.c siop.c tgets.c vers.c vga.c video.c vreset.c wdc.c wd.c
SRCS+= setjmp.S
1998-01-16 07:07:35 +03:00
CFLAGS= -Wno-main -ffreestanding
AFLAGS= -x assembler-with-cpp
2010-10-14 09:40:40 +04:00
CPPFLAGS= -nostdinc
CPPFLAGS+= -I${.OBJDIR} -I${S} -I${COMMONLIBDIR}/include -I${S}/lib/libsa
CPPFLAGS+= -I${ELF2PEF}
CPPFLAGS+= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
CPPFLAGS+= -D_STANDALONE -DRELOC=${RELOC} -DUSE_SCAN
CPPFLAGS+= -D__daddr_t=int32_t
#CPPFLAGS+= -DDBMONITOR
.if (${BASE} == "boot")
CPPFLAGS+= -DCONS_BE
.elif (${BASE} == "boot_com0")
CPPFLAGS+= -DCONS_SERIAL -DCOMSPEED=9600 -DCOMPORT=0x3f8
.elif (${BASE} == "boot_vga")
CPPFLAGS+= -DCONS_VGA
.endif
1998-01-16 07:07:35 +03:00
STRIPFLAG=
BINMODE= 444
# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=
1998-01-16 07:07:35 +03:00
RELOC= 0x700000
1998-01-16 07:07:35 +03:00
CLEANFILES+= vers.c machine powerpc ${PROG}.elf
1998-01-16 07:07:35 +03:00
LIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a
1998-01-16 07:07:35 +03:00
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: machine powerpc
.NOPATH: machine powerpc
1998-01-16 07:07:35 +03:00
machine::
-rm -f $@
ln -s ${S}/arch/${MACHINE}/include $@
powerpc::
-rm -f $@
ln -s ${S}/arch/powerpc/include $@
.endif
vers.c: ${.CURDIR}/../boot/version
${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
${.CURDIR}/../boot/version "bebox" ${NEWVERSWHAT}
${PROG}: ${OBJS} ${LIBS}
${LD} -o ${PROG}.elf -N -T ${.CURDIR}/../boot/ld.script \
-Ttext ${RELOC} ${OBJS} ${LIBS}
${STRIP} -o ${PROG} ${PROG}.elf
1998-01-16 07:07:35 +03:00
.include <bsd.prog.mk>