84d9c625bf
- 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
66 lines
1.4 KiB
Makefile
66 lines
1.4 KiB
Makefile
# $NetBSD: Makefile.mbr,v 1.18 2011/05/20 15:05:02 joerg Exp $
|
|
|
|
S= ${.CURDIR}/../../../../..
|
|
|
|
NOMAN= # defined
|
|
|
|
LIBCRT0= # nothing
|
|
LIBCRTBEGIN= # nothing
|
|
LIBCRTEND= # nothing
|
|
LIBC= # nothing
|
|
|
|
PIE_CFLAGS=
|
|
PIE_LDFLAGS=
|
|
PIE_AFLAGS=
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
STRIPFLAG= # override
|
|
|
|
SRCS?= mbr.S
|
|
|
|
BINDIR= /usr/mdec
|
|
BINMODE= 444
|
|
|
|
.PATH: ${.CURDIR}/..
|
|
|
|
LDFLAGS+= -nostdlib -Wl,-e,start
|
|
CPPFLAGS+= -I. -I${.CURDIR}/../../lib -I${S}
|
|
.if defined(__MINIX)
|
|
CPPFLAGS+= -DLOADADDR=${LOADADDR}
|
|
AFLAGS+= -Wa,--divide
|
|
|
|
BUILDSYMLINKS+= \
|
|
${NETBSDSRCDIR}/include/arch/i386/include/stackframe.h machine/stackframe.h \
|
|
${NETBSDSRCDIR}/include/arch/i386/include/fpu.h machine/fpu.h
|
|
|
|
DPSRCS+= machine/stackframe.h machine/fpu.h
|
|
.endif # defined(__MINIX)
|
|
|
|
.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
|
|
|
|
LOADADDR= 0x8800
|
|
|
|
AFLAGS.mbr.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
|
|
AFLAGS.gpt.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
|
|
|
|
${PROG}: ${OBJS}
|
|
${_MKTARGET_LINK}
|
|
${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${LOADADDR} ${OBJS}
|
|
@ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<mbr_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>
|