Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#	$NetBSD: Makefile.booters,v 1.28 2021/05/06 13:23:36 rin Exp $

S?=		${.CURDIR}/../../../..
MDEC_DIR?=	/usr/mdec
RELOC?=		0x3F0000
COPTS?=		-Os -Wall -Wno-main -Wmissing-prototypes -Wstrict-prototypes \
		-ffreestanding -fomit-frame-pointer -fno-unwind-tables \
		-fcommon
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 -m68020-60 -Wa,-m68030
CPPFLAGS+= -D__daddr_t=int32_t
CPPFLAGS+= -D_STANDALONE
CPPFLAGS+= ${INCPATH} ${DEFS}
BINDIR= ${MDEC_DIR}

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBCRTI=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

.include "${S}/conf/newvers_stand.mk"

.include <bsd.klinks.mk>

.if defined(LIB)

lib${LIB}.a:: ${OBJS}

.else

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

${PROG}: machine m68k ${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}/lib/sa/libsa.a
LIBKERN=	${LIBSA_DIR}/lib/kern/libkern.a

SRTOBJ?= ${LIBSA_DIR}/SRT0.o

LIB_BUG_DIR=	${.CURDIR}/../libbug
LIBBUG_DIR!=	cd ${LIB_BUG_DIR} && ${PRINTOBJDIR}
LIBBUG=${LIBBUG_DIR}/libbug.a

.PHONY: ${LIBBUG}
${LIBBUG}:
	@echo making sure the libbug is up to date...
	@(cd ${LIB_BUG_DIR}; ${MAKE})

BUGCRT=${LIBBUG_DIR}/bugstart.o

.PHONY: ${BUGCRT}
$(BUGCRT):
	@echo making sure the bugcrt is up to date...
	@(cd ${LIB_BUG_DIR}; ${MAKE} bugstart.o)

WRTVID=	${TOOL_MVME68KWRTVID}

.endif