minix/sys/arch/i386/stand/cdboot/Makefile
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00

64 lines
1.3 KiB
Makefile

# $NetBSD: Makefile,v 1.13 2013/09/12 05:54:38 joerg Exp $
S= ${.CURDIR}/../../../..
AFLAGS.cdboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
PIE_CFLAGS=
PIE_LDFLAGS=
PIE_AFLAGS=
NOMAN= # defined
.include <bsd.own.mk>
.if defined(__MINIX)
AFLAGS+= -Wa,--divide
.endif # defined(__MINIX)
STRIPFLAG= # nothing
LIBCRT0= # 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}
${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${PRIMARY_LOAD_ADDRESS} \
${OBJS}
@ 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>