2000-12-08 00:37:51 +03:00
|
|
|
# $NetBSD: Makefile.booters,v 1.6 2000/12/07 21:37:51 scw Exp $
|
2000-07-24 22:39:01 +04:00
|
|
|
|
|
|
|
S?= ${.CURDIR}/../../../..
|
|
|
|
MDEC_DIR?= /usr/mdec
|
|
|
|
RELOC?= 0x3F0000
|
|
|
|
COPTS?= -O2 -Wall -Wno-main -Wmissing-prototypes -Wstrict-prototypes
|
|
|
|
DEFS?=
|
|
|
|
STRIPFLAG?=
|
|
|
|
|
|
|
|
NOMAN= 1
|
|
|
|
MKMAN= no
|
|
|
|
NOLINT= 1
|
|
|
|
MKLINT= no
|
|
|
|
MKPIC= no
|
|
|
|
MKPROFILE=no
|
|
|
|
MKLINT=no
|
|
|
|
|
|
|
|
INCPATH=-I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \
|
|
|
|
-I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa
|
2000-12-01 01:26:26 +03:00
|
|
|
CFLAGS= -nostdinc -m68020-60 -Wa,-m68030 -D_STANDALONE \
|
|
|
|
-DLIBSA_USE_MEMSET -DLIBSA_USE_MEMCPY ${INCPATH} ${DEFS}
|
2000-07-24 22:39:01 +04:00
|
|
|
BINDIR= ${MDEC_DIR}
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/version)
|
|
|
|
SRCS+= vers.c
|
|
|
|
CLEANFILES+= vers.c
|
|
|
|
|
|
|
|
vers.c: version
|
|
|
|
sh ${S}/conf/newvers_stand.sh -DM ${.CURDIR}/version "mvme68k"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CLEANFILES+= machine m68k
|
|
|
|
|
|
|
|
machine :
|
|
|
|
-rm -f ${.TARGET}
|
|
|
|
ln -s $S/arch/mvme68k/include machine
|
|
|
|
|
|
|
|
m68k :
|
|
|
|
-rm -f ${.TARGET}
|
|
|
|
ln -s $S/arch/m68k/include m68k
|
|
|
|
|
|
|
|
.if defined(LIB)
|
|
|
|
|
|
|
|
lib${LIB}.a:: machine m68k ${OBJS}
|
2000-07-29 00:08:20 +04:00
|
|
|
beforedepend: machine m68k
|
2000-07-24 22:39:01 +04:00
|
|
|
|
|
|
|
.else
|
|
|
|
|
2000-12-05 00:25:57 +03:00
|
|
|
PROGDEPENDS?= ${SRTOBJ} ${BUGCRT} ${OBJS} ${LIBS}
|
|
|
|
PROGLINKOBJS?= ${PROGDEPENDS}
|
|
|
|
|
|
|
|
${PROG}: machine m68k ${PROGDEPENDS}
|
|
|
|
${LD} -N -Ttext ${RELOC} -o $@ ${PROGLINKOBJS}
|
2000-07-24 22:39:01 +04:00
|
|
|
|
|
|
|
LIB_SA_DIR= ${.CURDIR}/../libsa
|
|
|
|
LIBSA_DIR!=cd ${LIB_SA_DIR}; \
|
|
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
|
|
|
|
LIBSA=${LIBSA_DIR}/libsa.a
|
|
|
|
|
|
|
|
.PHONY: ${LIBSA}
|
|
|
|
${LIBSA}:
|
|
|
|
@echo making sure the libsa is up to date...
|
|
|
|
@cd ${LIB_SA_DIR} && ${MAKE}
|
|
|
|
|
|
|
|
SRTOBJ?= ${LIBSA_DIR}/SRT0.o
|
|
|
|
.PHONY: ${SRTOBJ}
|
|
|
|
${SRTOBJ}:
|
|
|
|
@echo making sure the libsa is up to date...
|
|
|
|
@cd ${LIB_SA_DIR} && ${MAKE} SRT0.o
|
|
|
|
|
|
|
|
LIB_BUG_DIR= ${.CURDIR}/../libbug
|
|
|
|
LIBBUG_DIR!=cd ${LIB_BUG_DIR}; \
|
|
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
|
|
|
|
LIBBUG=${LIBBUG_DIR}/libbug.a
|
|
|
|
|
|
|
|
.PHONY: ${LIBBUG}
|
|
|
|
${LIBBUG}:
|
|
|
|
@echo making sure the libbug is up to date...
|
|
|
|
@(cd ${LIB_BUG_DIR}; ${MAKE})
|
|
|
|
|
2000-12-08 00:37:51 +03:00
|
|
|
BUGCRT=${LIBBUG_DIR}/bugstart.o
|
2000-07-24 22:39:01 +04:00
|
|
|
|
|
|
|
.PHONY: ${BUGCRT}
|
|
|
|
$(BUGCRT):
|
|
|
|
@echo making sure the bugcrt is up to date...
|
2000-12-08 00:37:51 +03:00
|
|
|
@(cd ${LIB_BUG_DIR}; ${MAKE} bugstart.o)
|
2000-07-24 22:39:01 +04:00
|
|
|
|
|
|
|
WRTVID_BOOT_DIR= ${.CURDIR}/../wrtvid
|
|
|
|
WRTVID_DIR!=cd ${WRTVID_BOOT_DIR}; \
|
|
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
|
|
|
|
WRTVID=${WRTVID_DIR}/wrtvid
|
|
|
|
|
|
|
|
.PHONY: ${WRTVID}
|
|
|
|
${WRTVID}:
|
|
|
|
@echo making sure the wrtvid is up to date...
|
|
|
|
@(cd ${WRTVID_BOOT_DIR}; ${MAKE})
|
|
|
|
|
|
|
|
.endif
|