Remove building with NOCRYPTO option
[minix.git] / sys / arch / i386 / stand / Makefile.booters
blobdcb7847e5d876e68f6a78602c7884dc875bc253c
1 #       $NetBSD: Makefile.booters,v 1.90 2015/03/08 19:47:17 martin Exp $
3 .include <bsd.own.mk>
5 STRIPFLAG=
6 BINMODE=444
8 LIBCRT0=        # nothing
9 LIBCRTI=        # nothing
10 LIBCRTBEGIN=    # nothing
11 LIBCRTEND=      # nothing
12 LIBC=           # nothing
14 # Make sure we override any optimization options specified by the
15 # user.
16 .if ${MACHINE_ARCH} == "x86_64"
17 CPUFLAGS= -m32 -march=i386 -mtune=i386
18 .else
19 CPUFLAGS=  -march=i386 -mtune=i386
20 .endif
21 COPTS=  ${OPT_SIZE.${ACTIVE_CC}}
23 I386_STAND_DIR?= $S/arch/i386/stand
25 .PATH: ${I386_STAND_DIR}/lib
27 ROMSTART= start_rom.o
28 GENPROMDIR= ${I386_STAND_DIR}/genprom
29 GENPROMOBJDIR!= cd ${GENPROMDIR} && ${PRINTOBJDIR}
30 GENPROM= ${GENPROMOBJDIR}/genprom
32 .PATH: ${I386_STAND_DIR}/lib/crt/dos
33 DOSSTART= start_dos.o doscommain.o
35 .PATH: ${I386_STAND_DIR}/lib/crt/pxe
36 PXESTART= start_pxe.o
38 CPPFLAGS+= -nostdinc -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa
39 CPPFLAGS+= -D_STANDALONE
40 LDFLAGS+=  -nostdlib
42 # XXX
43 .if ${MACHINE_ARCH} == "x86_64"
44 CPPFLAGS+=-m32
45 LDFLAGS+=-Wl,-m,elf_i386
46 LIBKERN_ARCH=i386
47 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
48 .endif
50 CLEANFILES+= ${STARTFILE} vers.c ${BASE}.list
51 SRCS+=  vers.c
53 ### find out what to use for libkern
54 KERN_AS=        library
55 .include "${S}/lib/libkern/Makefile.inc"
56 LIBKERN=        ${KERNLIB}
58 ### find out what to use for libz
59 Z_AS=           library
60 .include "${S}/lib/libz/Makefile.inc"
61 LIBZ=           ${ZLIB}
63 ### find out what to use for libsa
64 SA_AS=          library
65 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
66 .include "${S}/lib/libsa/Makefile.inc"
67 LIBSA=          ${SALIB}
69 ### find out what to use for libi386
70 I386DIR= ${I386_STAND_DIR}/lib
71 .include "${I386DIR}/Makefile.inc"
72 LIBI386=                ${I386LIB}
74 cleandir distclean: .WAIT cleanlibdir
76 cleanlibdir:
77         -rm -rf lib
79 LDFLAGS+=-Wl,-M -Wl,-e,start    # -N does not work properly.
81 LIBLIST=${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBI386} ${LIBSA}
83 vers.c: ${VERSIONFILE} ${SOURCES} ${S}/conf/newvers_stand.sh
84         ${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} x86 ${NEWVERSWHAT}
86 CLEANFILES+= ${BASE}.sym
87 ${BASE}.sym: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
88         ${_MKTARGET_LINK}
89         ${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
90             ${STARTFILE} ${OBJS} ${LIBLIST} >${BASE}.list
92 CLEANFILES+= ${BASE}.rom ${BASE}.rom.tmp
93 ${BASE}.rom: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
94         ${_MKTARGET_LINK}
95         ${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
96             ${STARTFILE} ${OBJS} ${LIBLIST} >${BASE}.list
97         ${OBJCOPY} -O binary ${BASE}.sym ${BASE}.rom.tmp
98         ${GENPROM} ${ROM_SIZE} < ${BASE}.rom.tmp > ${BASE}.rom || \
99             ( rm -f ${BASE}.rom && false )
100         rm -f ${BASE}.rom.tmp
102 CLEANFILES+= ${BASE}.com
103 ${BASE}.com: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
104         ${_MKTARGET_LINK}
105         ${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
106             ${STARTFILE} ${OBJS} ${LIBLIST} >${BASE}.list
107         ${OBJCOPY} -O binary ${BASE}.sym ${BASE}.com
109 CLEANFILES+= ${BASE}.bin
110 ${BASE}.bin: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
111         ${_MKTARGET_LINK}
112         ${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC} \
113             ${STARTFILE} ${OBJS} ${LIBLIST} > ${BASE}.list
114         ${OBJCOPY} -O binary ${BASE}.sym ${BASE}.bin
116 .include <bsd.prog.mk>
117 KLINK_MACHINE=  i386
118 .include <bsd.klinks.mk>