minix/sys/arch/i386/stand/cdboot/Makefile
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

73 lines
1.5 KiB
Makefile

# $NetBSD: Makefile,v 1.14 2014/01/12 15:26:29 tsutsui Exp $
S= ${.CURDIR}/../../../..
AFLAGS.cdboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
.if defined(__MINIX)
# LSC: Still required by our old binutils
AFLAGS.cdboot.S+= -Wa,--divide
USE_BITCODE=no
.endif # defined(__MINIX)
PIE_CFLAGS=
PIE_LDFLAGS=
PIE_AFLAGS=
NOMAN= # defined
.include <bsd.own.mk>
STRIPFLAG= # nothing
LIBCRT0= # nothing
LIBCRTI= # nothing
LIBCRTBEGIN= # nothing
LIBCRTEND= # nothing
LIBC= # nothing
PRIMARY_LOAD_ADDRESS= 0x1000
SECONDARY_LOAD_ADDRESS= 0x10000
PROG= bootxx_cd9660
SRCS?= cdboot.S
BINDIR= /usr/mdec
BINMODE= 444
.PATH: ${.CURDIR}/..
LDFLAGS+= -nostdlib -Wl,-e,start
CPPFLAGS+= -I. -I${.CURDIR}/../lib -I${S}
CPPFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS}
CPPFLAGS+= -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+= -DDISABLE_KEYPRESS
.if ${MACHINE_ARCH} == "x86_64"
LDFLAGS+= -Wl,-m,elf_i386
AFLAGS+= -m32
.endif
BUILDSYMLINKS+= $S/arch/i386/include machine \
$S/arch/x86/include x86
DPSRCS+= machine x86
CLEANFILES+= ${PROG}.tmp
${PROG}: ${OBJS}
${_MKTARGET_LINK}
.if defined(__MINIX)
${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,--section-start=.text=${PRIMARY_LOAD_ADDRESS} \
${OBJS}
.else
${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${PRIMARY_LOAD_ADDRESS} \
${OBJS}
.endif
@ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<free_space\>' \
| ${TOOL_SED} 's/^0*//' ); \
echo "#### There are $$1 free bytes in ${PROG}"
${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
rm -f ${PROG}.tmp
.include <bsd.prog.mk>