[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.42

1.42    ! pooka       1: #      $NetBSD: Makefile.rump,v 1.41 2009/09/13 22:51:41 pooka 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.40      pooka      15: CWARNFLAGS+=   -Wno-format-zero-length
1.32      pooka      16: CPPFLAGS+=     -D_RUMPKERNEL
1.23      pooka      17: CPPFLAGS+=     -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR
1.21      pooka      18: CPPFLAGS+=     -DMAXUSERS=32
1.17      pooka      19: CPPFLAGS+=     -DDIAGNOSTIC
1.32      pooka      20: CPPFLAGS+=     -DCOMPAT_50
1.38      pooka      21: CPPFLAGS+=     -DDEBUGPRINT
1.15      pooka      22: CPPFLAGS+=     -I${.CURDIR} -I.
1.14      pooka      23: CPPFLAGS+=     -I${RUMPTOP}/../../common/include -I${RUMPTOP}/../arch
1.18      pooka      24: CPPFLAGS+=     -I${RUMPTOP}/include
1.21      pooka      25: CPPFLAGS+=     -I${RUMPTOP}/librump/rumpkern/opt
1.10      pooka      26: CPPFLAGS+=     -nostdinc -I${RUMPTOP}/..
                     27: #CPPFLAGS+=    -DDEBUG
1.1       pooka      28:
1.42    ! pooka      29: # kernel libs should not get linked against libc
        !            30: LDFLAGS+=      -nodefaultlibs
        !            31:
1.39      pooka      32: # make sure __NetBSD__ gets defined (for builds on non-NetBSD)
                     33: CPPFLAGS+=     -D__NetBSD__
                     34:
1.11      pooka      35: RUMPKERNEL=    This is NetBSD and I am the rump.  Good evening.
                     36:
1.13      pooka      37: # workaround: evbppc is not a well-defined arch
                     38: .if (${MACHINE} == "evbppc")
1.16      pooka      39: CPPFLAGS+=     -DPPC_OEA
1.13      pooka      40: .endif
                     41:
1.25      pooka      42: # If this file changes, we need a full rebuild
                     43: DPSRCS+=       ${RUMPTOP}/Makefile.rump
1.24      pooka      44:
1.41      pooka      45: .ifdef RUMP_ISMODULE
                     46: .PATH:         ${RUMPTOP}/librump
                     47: SRCS+=         rump_module.c
                     48: .endif
                     49: .ifdef RUMP_ISDOMAIN
                     50: .PATH:         ${RUMPTOP}/librump
                     51: SRCS+=         rump_domain.c
                     52: .endif
                     53:
1.24      pooka      54: #
                     55: # Rename library symbols before use.  If a symbol does not already belong
                     56: # to a rump namespace ("rump" or "RUMP"), prefix it with "rumpns".  This
                     57: # avoids accidentally linking any kernel symbol against host platform
                     58: # libraries.  The only non-renamed symbols are linkset delimiters and
                     59: # the GOT, which are more a property of the compiler than the kernel.
                     60: #
1.29      pooka      61: # Some toolchains generate unresolved symbols which are supposed to be
                     62: # satisfied by the toolchain itself when the program is linked.
                     63: # Unfortunately, we do not know which of the symbols are generated by
                     64: # the toolchain.  Worse, they vary from platform to platform and
                     65: # toolchain to toolchain.  The good news, however, is that this will
                     66: # be detected by a compile-time failure, so we can fairly easily manage
                     67: # a quirktable here.
                     68: .if ${MACHINE_CPU} == "mips"
                     69: _SYMQUIRK='|_gp_disp'
                     70: .elif ${MACHINE_CPU} == "hppa"
                     71: _SYMQUIRK='|\$$\$$'
                     72: .endif
1.24      pooka      73: __archivebuild: .USE
                     74:        ${_MKTARGET_BUILD}
                     75:        rm -f ${.TARGET}
1.34      pooka      76:        ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
1.24      pooka      77:        ${NM} -go ${.TARGET} | ${TOOL_AWK} '    \
1.29      pooka      78:            $$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \
1.24      pooka      79:              {printf "%s rumpns_%s\n", $$NF, $$NF}' \
                     80:            | sort | uniq  > renametab.${.TARGET}
1.37      pooka      81:        ${OBJCOPY} --preserve-dates --redefine-syms \
                     82:            renametab.${.TARGET} ${.TARGET}
1.24      pooka      83:        rm -f renametab.${.TARGET}
1.36      perry      84:        ${AR} ${_ARRANFL} ${.TARGET}

CVSweb <webmaster@jp.NetBSD.org>