1 # $NetBSD: Makefile.booters,v 1.19 2009/12/06 13:28:04 tsutsui Exp $
3 S?= ${.CURDIR}/../../../..
6 COPTS?= -Os -Wall -Wno-main -Wmissing-prototypes -Wstrict-prototypes \
7 -ffreestanding -fomit-frame-pointer
19 INCPATH=-I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \
20 -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa
21 CFLAGS= -nostdinc -m68020-60 -Wa,-m68030
22 CPPFLAGS+= -D__daddr_t=int32_t
23 CPPFLAGS+= -D_STANDALONE
24 CPPFLAGS+= ${INCPATH} ${DEFS}
27 # XXX SHOULD NOT NEED TO DEFINE THESE!
33 .if exists(${.CURDIR}/version)
38 ${HOST_SH} ${S}/conf/newvers_stand.sh -DM ${.CURDIR}/version "mvme68k"
41 .include <bsd.klinks.mk>
49 PROGDEPENDS?= ${SRTOBJ} ${BUGCRT} ${OBJS} ${LIBS}
50 PROGLINKOBJS?= ${PROGDEPENDS}
52 ${PROG}: machine m68k ${PROGDEPENDS}
53 ${LD} -N -Ttext ${RELOC} -o $@ ${PROGLINKOBJS}
57 LIB_SA_DIR= ${.CURDIR}/../libsa
58 LIBSA_DIR!= cd ${LIB_SA_DIR} && ${PRINTOBJDIR}
59 LIBSA=${LIBSA_DIR}/libsa.a
63 @echo making sure the libsa is up to date...
64 @cd ${LIB_SA_DIR} && ${MAKE}
66 SRTOBJ?= ${LIBSA_DIR}/SRT0.o
69 @echo making sure the libsa is up to date...
70 @cd ${LIB_SA_DIR} && ${MAKE} SRT0.o
72 LIB_BUG_DIR= ${.CURDIR}/../libbug
73 LIBBUG_DIR!= cd ${LIB_BUG_DIR} && ${PRINTOBJDIR}
74 LIBBUG=${LIBBUG_DIR}/libbug.a
78 @echo making sure the libbug is up to date...
79 @(cd ${LIB_BUG_DIR}; ${MAKE})
81 BUGCRT=${LIBBUG_DIR}/bugstart.o
85 @echo making sure the bugcrt is up to date...
86 @(cd ${LIB_BUG_DIR}; ${MAKE} bugstart.o)
88 WRTVID_BOOT_DIR= ${.CURDIR}/../wrtvid
89 WRTVID_DIR!= cd ${WRTVID_BOOT_DIR} && ${PRINTOBJDIR}
90 WRTVID=${WRTVID_DIR}/wrtvid
94 @echo making sure the wrtvid is up to date...
95 @(cd ${WRTVID_BOOT_DIR}; ${MAKE} dependall)