]> Zhao Yanbai Git Server - minix.git/commitdiff
Makefile fixups for cross compilation
authorDirk Vogt <dirk@minix3.org>
Tue, 1 May 2012 14:09:06 +0000 (16:09 +0200)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:53:24 +0000 (10:53 +0000)
kernel/Makefile
man/Makefile
sys/arch/i386/stand/boot/Makefile.boot
sys/arch/i386/stand/bootxx/Makefile.bootxx

index b85519743dfe2cbf6d82e68579b5a9e62e452269..1b6d23b3cac1bd702272ae60e1d754fdfa07bb78 100644 (file)
@@ -15,12 +15,12 @@ CFLAGS += -D__kernel__
 
 CPPFLAGS+= -fno-stack-protector -D_NETBSD_SOURCE
 LDFLAGS+= -T ${.CURDIR}/arch/${ARCH}/kernel.lds
-LDFLAGS+= -nostdlib -L${LIBDIR}
+LDFLAGS+= -nostdlib -L${DESTDIR}/${LIBDIR}
 LDADD+= -lminlib
 DPADD+= ${LIBMINLIB}
-.if ${CC} == "gcc"
+.if !empty(CC:M*gcc)
 LDADD+=        -lgcc -lsys -lgcc -lminc
-.elif ${CC} == "clang"
+.elif !empty(CC:M*clang)
 LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc
 DPADD+=        ${LIBC}
 .endif
index 163dfde284c83bd9e5a961b1c8c3906178afff1d..40e96eeec5c612c4e06ee7115d96f56f288689ef 100644 (file)
@@ -7,8 +7,8 @@ WHATISDBDIR?=   /usr/man
 makedb:
        ${TOOL_MAKEWHATIS} ${DESTDIR}${WHATISDBDIR}
 .if ${MKUNPRIVED} != "no"
-       echo ".${WHATISDBDIR}/whatis.db type=file mode=0444 uname=${BINOWN} gname=${BINGRP}" \
-           | ${METALOG.add}
+#      echo ".${WHATISDBDIR}/whatis.db type=file mode=0444 uname=${BINOWN} gname=${BINGRP}" \
+#          | ${METALOG.add}
 .endif
 
 .include <bsd.subdir.mk>
index 53727d3dda836b6a002d4f3c72d04704243349d2..4b98817fcde3b8cca857c6c256634253976d70fa 100644 (file)
@@ -34,7 +34,7 @@ BINMODE=444
 
 .PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib
 
-LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start
+LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start -L${DESTDIR}/${LIBDIR}
 CPPFLAGS+= -I ${.CURDIR}/..  -I ${.CURDIR}/../../lib -I ${S}/lib/libsa
 CPPFLAGS+= -I ${.OBJDIR}
 # Make sure we override any optimization options specified by the user
index 58bcd4342fb961a396268242a07c2b85aeb294a1..338fc3aca748c1c6d0bce6c6c92d1ef4694b6084 100644 (file)
@@ -39,7 +39,7 @@ BINMODE=444
 
 .PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib
 
-LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,start
+LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,start -L${DESTDIR}/${LIBDIR}
 CPPFLAGS+= -DBOOTXX
 # CPPFLAGS+= -D__daddr_t=int32_t
 CPPFLAGS+= -I ${.CURDIR}/../../lib -I ${.OBJDIR}
@@ -52,7 +52,7 @@ CPPFLAGS+= -DXXfs_read=${FS}_read
 CPPFLAGS+= -DXXfs_stat=${FS}_stat
 CPPFLAGS+= -DFS=${FS}
 # clang generates too big bootxx_xxx
-.if (${CC} == "clang")
+.if !empty(CC:M*clang)
 CPPFLAGS+= -Os
 .endif
 # CPPFLAGS+= -DBOOT_MSG_COM0