NetBSD/sys/arch/landisk/stand/Makefile.bootprogs

80 lines
1.4 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile.bootprogs,v 1.1 2006/09/01 21:26:18 uwe Exp $
S= ${.CURDIR}/../../../../..
NOMAN= # defined
BINDIR= /usr/mdec
BINMODE= 0444
PRIMARY_LOAD_ADDRESS?=0x8c201000
SECONDARY_LOAD_ADDRESS?=0x8ff00000
.include <bsd.own.mk>
STRIPFLAG= # override
LIBCRT0= # nothing
LIBCRTBEGIN= # nothing
LIBCRTEND= # nothing
LIBC= # nothing
.PATH: ${.CURDIR}/..
COPTS= -Os -ffreestanding
LDFLAGS+= -N
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -DSH4
CPPFLAGS+= -I${.OBJDIR} -I${.CURDIR}/.. -I${.CURDIR}/../../boot -I${S}
LANDISK_STAND_DIR?= $S/arch/landisk/stand
CLEANFILES+= machine sh3
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: machine sh3
.NOPATH: machine sh3
machine::
-rm -f $@
ln -s ${S}/arch/${MACHINE}/include $@
sh3::
-rm -f $@
ln -s ${S}/arch/sh3/include $@
.endif
lib:
.ifdef LIBOBJ
-rm -f $@
ln -s ${LIBOBJ}/lib .
[ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib
.else
mkdir lib
.endif
### find out what to use for libsa
SA_AS= library
.include "${S}/lib/libsa/Makefile.inc"
LIBSA= ${SALIB}
CPPFLAGS+= -I$(SADIR)
### find out what to use for libkern
KERN_AS= library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN= ${KERNLIB}
### find out what to use for libz
Z_AS= library
.include "${S}/lib/libz/Makefile.inc"
LIBZ= ${ZLIB}
realdepend realall: lib
cleandir distclean: cleanlibdir
cleanlibdir:
-rm -rf lib