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.bootxxx,v 1.9 2020/07/01 23:37:10 rin Exp $

NOMAN=	# defined

.include <bsd.own.mk>

PROG=	boot.atari

STRIPFLAG=
BINMODE=${NONBINMODE}

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

# logically src/sys
S=${.CURDIR}/../../../../..
S_SA=${S}/lib/libsa
S_KERN=${S}/lib/libkern
S_MACHSA=${S}/arch/atari/stand/libsa
S_LIBTOS=${S}/arch/atari/stand/tostools/libtos

S_MACHSAOBJ!=	cd ${S_MACHSA} && ${PRINTOBJDIR}

LIBSA=${S_MACHSAOBJ}/lib/sa/libsa.a
LIBKERN=${S_MACHSAOBJ}/lib/kern/libkern.a

.include "../../Makefile.booters"
.include "../../xxboot/${BTYPE}_LOADADDR"

CPPFLAGS+=	-I. -I${S_LIBTOS} -I${S_MACHSA} -I${S_KERN} -I${S_SA} -I${S}
LINKFLAGS=	-static -N -e start -Ttext ${LOADADDR3}

.PATH: ${.CURDIR}/.. ${S_LIBTOS}

#
# Warning: start.S should be the first source!
#
SRCS=	start.S bootxxx.c aout.c bsdstart.S elf.c filesystem.c sysinfo.c

LIBS=	${LIBSA} ${LIBKERN}

beforeinstall:
	${INSTALL_DIR} ${DESTDIR}${BINDIR}

${PROG}:	${OBJS} ${LIBS}
	${_MKTARGET_LINK}
	${LD} ${LINKFLAGS} -o ${.TARGET}.elf ${OBJS} ${LIBS}
	${OBJCOPY} -O binary ${PROG}.elf ${.TARGET}

CLEANFILES+=	${PROG}.elf

.include <bsd.prog.mk>