| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile.rump,v 1.121 2016/07/09 05:52:22 matt Exp $ | | 1 | # $NetBSD: Makefile.rump,v 1.122 2017/10/08 18:46:10 joerg Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | .if !defined(_RUMP_MK) | | 4 | .if !defined(_RUMP_MK) |
5 | _RUMP_MK= #defined | | 5 | _RUMP_MK= #defined |
6 | | | 6 | |
7 | WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet | | 7 | WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet |
8 | NOLINT= # kernel code | | 8 | NOLINT= # kernel code |
9 | | | 9 | |
10 | .include <bsd.own.mk> | | 10 | .include <bsd.own.mk> |
11 | | | 11 | |
12 | # Use NetBSD kernel ABI by default on x86 archs. Performance-related | | 12 | # Use NetBSD kernel ABI by default on x86 archs. Performance-related |
13 | # compile-time options may override this at a later date. | | 13 | # compile-time options may override this at a later date. |
14 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") | | 14 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") |
| @@ -139,39 +139,39 @@ DPSRCS+= ${RUMPTOP}/Makefile.rump | | | @@ -139,39 +139,39 @@ DPSRCS+= ${RUMPTOP}/Makefile.rump |
139 | # no easy way to get WARNS out of bsd.sys.mk | | 139 | # no easy way to get WARNS out of bsd.sys.mk |
140 | RUMPCOMP_USER_WARNFLAGS= -Wall -Wextra -Wno-unused-parameter | | 140 | RUMPCOMP_USER_WARNFLAGS= -Wall -Wextra -Wno-unused-parameter |
141 | RUMPCOMP_USER_WARNFLAGS+= -Wstrict-prototypes -Wmissing-prototypes | | 141 | RUMPCOMP_USER_WARNFLAGS+= -Wstrict-prototypes -Wmissing-prototypes |
142 | | | 142 | |
143 | .ifdef RUMPCOMP_USER_SRCS && !defined(RUMPKERN_ONLY) | | 143 | .ifdef RUMPCOMP_USER_SRCS && !defined(RUMPKERN_ONLY) |
144 | .if empty(DESTDIR) | | 144 | .if empty(DESTDIR) |
145 | DESTDIR=/ | | 145 | DESTDIR=/ |
146 | .endif | | 146 | .endif |
147 | BUILDRUMP_CPPFLAGS ?= -isysroot ${DESTDIR} | | 147 | BUILDRUMP_CPPFLAGS ?= -isysroot ${DESTDIR} |
148 | RUMPCOMP_USER_WERROR = ${${_NOWERROR} == "no" :?-Werror:} | | 148 | RUMPCOMP_USER_WERROR = ${${_NOWERROR} == "no" :?-Werror:} |
149 | .for rcusrc in ${RUMPCOMP_USER_SRCS:R} | | 149 | .for rcusrc in ${RUMPCOMP_USER_SRCS:R} |
150 | ${rcusrc}.d: ${rcusrc}.c | | 150 | ${rcusrc}.d: ${rcusrc}.c |
151 | ${_MKTARGET_CREATE} | | 151 | ${_MKTARGET_CREATE} |
152 | ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${CPUFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:O:u:M*${rcusrc}.c} | | 152 | ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${CPUFLAGS} ${REPROFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:O:u:M*${rcusrc}.c} |
153 | | | 153 | |
154 | ${rcusrc}.o: ${rcusrc}.c | | 154 | ${rcusrc}.o: ${rcusrc}.c |
155 | ${_MKTARGET_COMPILE} | | 155 | ${_MKTARGET_COMPILE} |
156 | ${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${CPUFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} | | 156 | ${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${CPUFLAGS} ${REPROFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} |
157 | | | 157 | |
158 | ${rcusrc}.pico: ${rcusrc}.c | | 158 | ${rcusrc}.pico: ${rcusrc}.c |
159 | ${_MKTARGET_COMPILE} | | 159 | ${_MKTARGET_COMPILE} |
160 | ${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${CPUFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} | | 160 | ${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${CPUFLAGS} ${REPROFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} |
161 | | | 161 | |
162 | ${rcusrc}.po: ${rcusrc}.c | | 162 | ${rcusrc}.po: ${rcusrc}.c |
163 | ${_MKTARGET_COMPILE} | | 163 | ${_MKTARGET_COMPILE} |
164 | ${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${CPUFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} | | 164 | ${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${CPUFLAGS} ${REPROFLAGS} ${RUMPCOMP_USER_WERROR} ${RUMPCOMP_USER_WARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*${rcusrc}.c} |
165 | | | 165 | |
166 | RUMPOBJ_NORENAME+=${rcusrc}.o ${rcusrc}.pico ${rcusrc}.po | | 166 | RUMPOBJ_NORENAME+=${rcusrc}.o ${rcusrc}.pico ${rcusrc}.po |
167 | SRCS+=${rcusrc}.c | | 167 | SRCS+=${rcusrc}.c |
168 | .endfor | | 168 | .endfor |
169 | .endif | | 169 | .endif |
170 | | | 170 | |
171 | # | | 171 | # |
172 | # Rename library symbols before use. If a symbol does not already belong | | 172 | # Rename library symbols before use. If a symbol does not already belong |
173 | # to a rump namespace ("rump" or "RUMP"), prefix it with "rumpns". This | | 173 | # to a rump namespace ("rump" or "RUMP"), prefix it with "rumpns". This |
174 | # avoids accidentally linking any kernel symbol against host platform | | 174 | # avoids accidentally linking any kernel symbol against host platform |
175 | # libraries. The only non-renamed symbols are linkset delimiters and | | 175 | # libraries. The only non-renamed symbols are linkset delimiters and |
176 | # the GOT, which are more a property of the compiler than the kernel. | | 176 | # the GOT, which are more a property of the compiler than the kernel. |
177 | # | | 177 | # |