Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x68k/stand/loadbsd Convert to using -nostdinc, and ...



details:   https://anonhg.NetBSD.org/src/rev/279ae9d02455
branches:  trunk
changeset: 764178:279ae9d02455
user:      he <he%NetBSD.org@localhost>
date:      Wed Apr 13 11:10:49 2011 +0000

description:
Convert to using -nostdinc, and set include paths and create symlinks
so that we include the source tree's sys/, machine/ and m68k/ headers,
and only as a last resort use DESTDIR's /usr/include.  For some reason
the host's bootinfo.h got included ahead of the x68k variant, causing
a build failure in my case.

diffstat:

 sys/arch/x68k/stand/loadbsd/Makefile |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 9416f75aad77 -r 279ae9d02455 sys/arch/x68k/stand/loadbsd/Makefile
--- a/sys/arch/x68k/stand/loadbsd/Makefile      Wed Apr 13 09:46:38 2011 +0000
+++ b/sys/arch/x68k/stand/loadbsd/Makefile      Wed Apr 13 11:10:49 2011 +0000
@@ -1,4 +1,6 @@
-#      $NetBSD: Makefile,v 1.12 2006/06/29 03:46:43 lukem Exp $
+#      $NetBSD: Makefile,v 1.13 2011/04/13 11:10:49 he Exp $
+
+S=     ${.CURDIR}/../../../..
 
 BASE=  loadbsd
 PROG=  ${BASE}.x       # Human68k ".x" executable
@@ -20,12 +22,22 @@
 
 CPPFLAGS=      -W -Wall -O -fomit-frame-pointer
 CPPFLAGS+=     -m68000 -Wa,-mc68000
+CPPFLAGS+=     -nostdinc 
+CPPFLAGS+=     -I$S -I.
 CPPFLAGS+=     -I${.CURDIR}/../libdos -I${.CURDIR}/../libiocs
+CPPFLAGS+=     -I${DESTDIR}/usr/include
 LDFLAGS=       -nostdlib -static -N
 LDLIBS=                -L${LIBDOS} -ldos -L${LIBIOCS} -liocs -L${DESTDIR}/usr/lib -lc
 DPADD+=                ${AOUT2HUX}
 
 CLEANFILES+=   ${BASE}1 ${BASE}2
+CLEANFILES+=   machine m68k
+
+.if !make(obj) && !make(clean) && !make(cleandir)
+.BEGIN:
+       rm -f machine && ln -s $S/arch/x68k/include machine
+       rm -f m68k && ln -s $S/arch/m68k/include m68k
+.endif
 
 ${PROG}: ${BASE}1 ${BASE}2
        ${_MKTARGET_LINK}



Home | Main Index | Thread Index | Old Index