d44e9483b0
more problems for "make depend" - tested with and without obj dirs.
88 lines
2.0 KiB
Makefile
88 lines
2.0 KiB
Makefile
# $NetBSD: Makefile.booters,v 1.18 1999/03/27 07:17:50 simonb Exp $
|
|
#
|
|
# NOTE: $S must correspond to the top of the 'sys' tree
|
|
|
|
BINDIR?=/usr/mdec
|
|
BINMODE?=444
|
|
|
|
.BEGIN: ${.OBJDIR}/machine ${.OBJDIR}/mips
|
|
${PROG} depend all: ${.OBJDIR}/machine ${.OBJDIR}/mips
|
|
CLEANFILES+= machine mips
|
|
|
|
${.OBJDIR}/machine:
|
|
-rm -f ${.TARGET}
|
|
ln -s $S/arch/${MACHINE}/include ${.TARGET}
|
|
|
|
${.OBJDIR}/mips:
|
|
-rm -f ${.TARGET}
|
|
ln -s $S/arch/mips/include mips
|
|
|
|
CLEANFILES+=vers.c vers.o ${PROG}.map
|
|
|
|
# Tailor C compilation for standalone environment.
|
|
COPTS= -Os # -Os gives smaller code
|
|
|
|
C_MACHDEP=-mmemcpy -mno-abicalls -G 128 # even smaller code
|
|
|
|
DEFS?= -DSMALL -D_STANDALONE -D_NO_PROM_DEFINES -DNO_ABICALLS \
|
|
${BOOTDEFADD}
|
|
INCL?= -nostdinc -I${.OBJDIR} -I$S -I${PMAX_STAND_DIR}/lib -I$S/lib/libsa
|
|
|
|
CFLAGS+= ${CWARN} ${C_MACHDEP}
|
|
AFLAGS+= -D_LOCORE -D_KERNEL
|
|
CPPFLAGS+= ${DEFS} ${INCL}
|
|
|
|
LDBUG= -T $S/arch/mips/conf/stand.ldscript
|
|
|
|
# We don't need libkern/libsa for the first stage bootblocks
|
|
.if ${PROG} != "bootxx"
|
|
|
|
### find out what to use for libsa
|
|
SA_AS= library
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
LIBSA= ${SALIB}
|
|
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_INCLUDE_NET=no
|
|
|
|
### find out what to use for libz
|
|
Z_AS= library
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
LIBZ= ${ZLIB}
|
|
|
|
### find out what to use for libkern
|
|
KERN_AS= library
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
.endif # ${PROG} != "bootxx"
|
|
|
|
PMAX_STAND_DIR?= $S/arch/pmax/stand
|
|
### find out what to use for libpmax
|
|
PMAXDIR= ${PMAX_STAND_DIR}/lib
|
|
.include "${PMAXDIR}/Makefile.inc"
|
|
LIBPMAX= ${PMAXLIB}
|
|
|
|
cleandir distclean: cleanlibdir
|
|
|
|
cleanlibdir:
|
|
rm -rf lib
|
|
|
|
LIBS= ${LIBPMAX} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBPMAX}
|
|
VERS_O?=vers.o
|
|
|
|
vers.o: ${VERSIONFILE}
|
|
sh ${PMAX_STAND_DIR}/lib/newvers.sh ${.ALLSRC} ${NEWVERSWHAT}
|
|
${COMPILE.c} vers.c
|
|
|
|
${PROG}: ${OBJS} ${VERS_O} ${LIBS}
|
|
ld -Map ${PROG}.map -N -x -Ttext ${RELOC} ${LDBUG} -e start \
|
|
${OBJS} ${VERS_O} ${LIBS} -o ${PROG}
|
|
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
# be sure to turn off any PIC flags for standalone library code.
|
|
CPICFLAGS=
|
|
CAPICFLAGS=
|
|
CPPPICFLAGS=
|
|
APICFLAGS=
|