Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.lib.mk
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | |||||
# automatically generated (see bsd.symver.mk above). | # automatically generated (see bsd.symver.mk above). | ||||
.if !empty(VERSION_MAP) | .if !empty(VERSION_MAP) | ||||
${SHLIB_NAME_FULL}: ${VERSION_MAP} | ${SHLIB_NAME_FULL}: ${VERSION_MAP} | ||||
LDFLAGS+= -Wl,--version-script=${VERSION_MAP} | LDFLAGS+= -Wl,--version-script=${VERSION_MAP} | ||||
.endif | .endif | ||||
.if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) | .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) | ||||
OBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/} | OBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/} | ||||
.if ${OBJS:M/*} | |||||
# Absolute paths to OBJS should be an error inside ${SRCTOP}, but external users | |||||
# might be relying on this feature, so make it a warning there. | |||||
.if defined(SRCTOP) && ${OBJS:M${SRCTOP}*} | |||||
.error "$$OBJS absolute path not allowed: ${OBJS:M${SRCTOP}*}" | |||||
sjg: What about folk who insist on dribbling .o's in src tree?
I may have little sympathy for them… | |||||
arichardsonAuthorUnsubmitted Done Inline ActionsI could add a hidden variable such as _ALLOW_OBJS_IN_SRC to avoid this .error/.warning? arichardson: I could add a hidden variable such as `_ALLOW_OBJS_IN_SRC` to avoid this .error/.warning? | |||||
.else | |||||
.warning "$$OBJS absolute path not allowed: ${OBJS:M/*}" | |||||
.endif | |||||
.endif | |||||
BCOBJS+= ${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.bco/g} | BCOBJS+= ${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.bco/g} | ||||
LLOBJS+= ${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.llo/g} | LLOBJS+= ${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.llo/g} | ||||
CLEANFILES+= ${OBJS} ${BCOBJS} ${LLOBJS} ${STATICOBJS} | CLEANFILES+= ${OBJS} ${BCOBJS} ${LLOBJS} ${STATICOBJS} | ||||
.endif | .endif | ||||
.if defined(LIB) && !empty(LIB) | .if defined(LIB) && !empty(LIB) | ||||
_LIBS= lib${LIB_PRIVATE}${LIB}.a | _LIBS= lib${LIB_PRIVATE}${LIB}.a | ||||
▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines |
What about folk who insist on dribbling .o's in src tree?
I may have little sympathy for them, but ...