[BACK]Return to Makefile.rump CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / rump

Annotation of src/sys/rump/Makefile.rump, Revision 1.34

1.34    ! pooka       1: #      $NetBSD: Makefile.rump,v 1.33 2009/02/12 13:23:17 lukem Exp $
1.1       pooka       2: #
                      3:
1.33      lukem       4: WARNS?=                3       # XXX: src/sys won't compile with -Wsign-compare yet
1.10      pooka       5: NOLINT=                # kernel code
1.1       pooka       6:
1.20      pooka       7: .include <bsd.own.mk>
                      8:
1.18      pooka       9: # use kernel ABI instead of rump ABI (needs md code)
1.31      he         10: .ifndef RUMPKMOD
1.18      pooka      11: CPPFLAGS:=     -I${RUMPTOP}/include ${CPPFLAGS}
                     12: .endif
                     13:
1.22      pooka      14: CFLAGS+=       -ffreestanding -fno-strict-aliasing
1.32      pooka      15: CPPFLAGS+=     -D_RUMPKERNEL
1.23      pooka      16: CPPFLAGS+=     -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR
1.21      pooka      17: CPPFLAGS+=     -DMAXUSERS=32
1.17      pooka      18: CPPFLAGS+=     -DDIAGNOSTIC
1.32      pooka      19: CPPFLAGS+=     -DCOMPAT_50
1.15      pooka      20: CPPFLAGS+=     -I${.CURDIR} -I.
1.14      pooka      21: CPPFLAGS+=     -I${RUMPTOP}/../../common/include -I${RUMPTOP}/../arch
1.18      pooka      22: CPPFLAGS+=     -I${RUMPTOP}/include
1.21      pooka      23: CPPFLAGS+=     -I${RUMPTOP}/librump/rumpkern/opt
1.10      pooka      24: CPPFLAGS+=     -nostdinc -I${RUMPTOP}/..
                     25: #CPPFLAGS+=    -DDEBUG
1.1       pooka      26:
1.11      pooka      27: RUMPKERNEL=    This is NetBSD and I am the rump.  Good evening.
                     28:
1.13      pooka      29: # workaround: evbppc is not a well-defined arch
                     30: .if (${MACHINE} == "evbppc")
1.16      pooka      31: CPPFLAGS+=     -DPPC_OEA
1.13      pooka      32: .endif
                     33:
1.25      pooka      34: # If this file changes, we need a full rebuild
                     35: DPSRCS+=       ${RUMPTOP}/Makefile.rump
1.24      pooka      36:
                     37: #
                     38: # Rename library symbols before use.  If a symbol does not already belong
                     39: # to a rump namespace ("rump" or "RUMP"), prefix it with "rumpns".  This
                     40: # avoids accidentally linking any kernel symbol against host platform
                     41: # libraries.  The only non-renamed symbols are linkset delimiters and
                     42: # the GOT, which are more a property of the compiler than the kernel.
                     43: #
1.29      pooka      44: # Some toolchains generate unresolved symbols which are supposed to be
                     45: # satisfied by the toolchain itself when the program is linked.
                     46: # Unfortunately, we do not know which of the symbols are generated by
                     47: # the toolchain.  Worse, they vary from platform to platform and
                     48: # toolchain to toolchain.  The good news, however, is that this will
                     49: # be detected by a compile-time failure, so we can fairly easily manage
                     50: # a quirktable here.
                     51: .if ${MACHINE_CPU} == "mips"
                     52: _SYMQUIRK='|_gp_disp'
                     53: .elif ${MACHINE_CPU} == "hppa"
                     54: _SYMQUIRK='|\$$\$$'
                     55: .endif
1.24      pooka      56: __archivebuild: .USE
                     57:        ${_MKTARGET_BUILD}
                     58:        rm -f ${.TARGET}
1.34    ! pooka      59:        ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
1.24      pooka      60:        ${NM} -go ${.TARGET} | ${TOOL_AWK} '    \
1.29      pooka      61:            $$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \
1.24      pooka      62:              {printf "%s rumpns_%s\n", $$NF, $$NF}' \
                     63:            | sort | uniq  > renametab.${.TARGET}
                     64:        ${OBJCOPY} --redefine-syms renametab.${.TARGET} ${.TARGET}
                     65:        rm -f renametab.${.TARGET}
                     66:        ${RANLIB} ${.TARGET}

CVSweb <webmaster@jp.NetBSD.org>