[BACK]Return to Makefile.booters CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / mvmeppc / stand

File: [cvs.NetBSD.org] / src / sys / arch / mvmeppc / stand / Makefile.booters (download)

Revision 1.5, Mon Jun 14 22:25:38 2004 UTC (18 years, 3 months ago) by he
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-lazymbuf, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, ktrace-lwp-base, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Changes since 1.4: +3 -2 lines

Factor out the C preprocessor defines and include flags from CFLAGS
to CPPFLAGS, so that they are also applied when compiling assembler
files.

#	$NetBSD: Makefile.booters,v 1.5 2004/06/14 22:25:38 he Exp $

S?=		${.CURDIR}/../../../..
MDEC_DIR?=	/usr/mdec
RELOC?=		0x3F0000
COPTS?=		-O2 -Wall -Wno-main -Wmissing-prototypes -Wstrict-prototypes
DEFS?= 
STRIPFLAG?=

NOMAN=  # defined
NOMAN=	# defined
NOLINT= # defined
NOLINT=	# defined
NOPIC=	# defined
NOPROFILE=# defined
NOLINT=# defined

INCPATH=-I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \
        -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa
CFLAGS= -nostdinc -ffreestanding
CPPFLAGS= -D_STANDALONE \
	-DLIBSA_USE_MEMSET -DLIBSA_USE_MEMCPY ${INCPATH} ${DEFS}
BINDIR= ${MDEC_DIR}

.if exists(${.CURDIR}/version)
SRCS+= vers.c
CLEANFILES+= vers.c

vers.c: version
	${HOST_SH} ${S}/conf/newvers_stand.sh -DM ${.CURDIR}/version "mvmeppc"
.endif

CLEANFILES+= machine powerpc

machine :
	-rm -f ${.TARGET}
	ln -s $S/arch/mvmeppc/include machine

powerpc :
	-rm -f ${.TARGET}
	ln -s $S/arch/powerpc/include powerpc

.if defined(LIB)

lib${LIB}.a:: machine powerpc ${OBJS}
beforedepend:	machine powerpc

.else

PROGDEPENDS?=	${SRTOBJ} ${OBJS} ${LIBS}
PROGLINKOBJS?=	${PROGDEPENDS}

${PROG}: machine powerpc ${PROGDEPENDS}
	${LD} -N -Ttext ${RELOC} -o $@ ${PROGLINKOBJS}

.include <bsd.own.mk>

LIB_SA_DIR=	${.CURDIR}/../libsa
LIBSA_DIR!=	cd ${LIB_SA_DIR} && ${PRINTOBJDIR}
LIBSA=${LIBSA_DIR}/libsa.a

.PHONY: ${LIBSA}
${LIBSA}:
	@echo making sure libsa is up to date...
	@cd ${LIB_SA_DIR} && ${MAKE}

SRTOBJ?= ${LIBSA_DIR}/srt0.o
.PHONY: ${SRTOBJ}
${SRTOBJ}:
	@echo making sure srt0 is up to date...
	@cd ${LIB_SA_DIR} && ${MAKE} srt0.o

#WRTVID_BOOT_DIR=  ${.CURDIR}/../wrtvid
#WRTVID_DIR!=	cd ${WRTVID_BOOT_DIR} && ${PRINTOBJDIR}
#WRTVID=${WRTVID_DIR}/wrtvid
#
#.PHONY: ${WRTVID}
#${WRTVID}:
#	@echo making sure the wrtvid is up to date...
#	@(cd ${WRTVID_BOOT_DIR}; ${MAKE} dependall)
#
.endif