Remove building with NOCRYPTO option
[minix3.git] / sys / arch / i386 / stand / mbr / Makefile.mbr
blob79a8c4329cb398cd319beb13183dec7483fdabc7
1 #       $NetBSD: Makefile.mbr,v 1.19 2014/01/12 15:26:29 tsutsui Exp $
3 S=              ${.CURDIR}/../../../../..
5 NOMAN=          # defined
7 LIBCRT0=        # nothing
8 LIBCRTI=        # nothing
9 LIBCRTBEGIN=    # nothing
10 LIBCRTEND=      # nothing
11 LIBC=           # nothing
13 PIE_CFLAGS=
14 PIE_LDFLAGS=
15 PIE_AFLAGS=
17 .if defined(__MINIX)
18 USE_BITCODE=no
19 .endif # defined(__MINIX)
21 .include <bsd.own.mk>
23 STRIPFLAG=      # override
25 SRCS?=          mbr.S
27 BINDIR=         /usr/mdec
28 BINMODE=        444
30 .PATH:          ${.CURDIR}/..
32 LDFLAGS+=       -nostdlib -Wl,-e,start
33 CPPFLAGS+=      -I. -I${.CURDIR}/../../lib -I${S}
35 .if ${MACHINE_ARCH} == "x86_64"
36 LDFLAGS+=       -Wl,-m,elf_i386
37 AFLAGS+=        -m32
38 .endif
40 BUILDSYMLINKS+= $S/arch/i386/include    machine \
41                 $S/arch/x86/include     x86
43 DPSRCS+=        machine x86
45 CLEANFILES+=    ${PROG}.tmp
47 LOADADDR=       0x8800
49 AFLAGS.mbr.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
50 AFLAGS.gpt.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
52 .if defined(__MINIX)
53 CPPFLAGS+= -DLOADADDR=${LOADADDR}
54 .endif # defined(__MINIX)
56 ${PROG}: ${OBJS}
57         ${_MKTARGET_LINK}
58 .if defined(__MINIX)
59         ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,--section-start=.text=${LOADADDR} ${OBJS}
60 .else
61         ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${LOADADDR} ${OBJS}
62 .endif # defined(__MINIX)
63         @ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<mbr_space\>' \
64                     | ${TOOL_SED} 's/^0*//'  ); \
65                 echo "#### There are $$1 free bytes in ${PROG}"
66         ${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
67         rm -f ${PROG}.tmp
69 .include <bsd.prog.mk>