mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-05 12:56:08 +00:00
Check the existence of a 'beforelinking' target and make the resulting
program or library depend on that before doing the final linking. This will be needed by DTrace. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
9a1d115000
commit
c2c48445ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212423
@ -198,7 +198,11 @@ SOBJS+= ${OBJS:.o=.So}
|
||||
.if defined(SHLIB_NAME)
|
||||
_LIBS+= ${SHLIB_NAME}
|
||||
|
||||
.if target(beforelinking)
|
||||
${SHLIB_NAME}: ${SOBJS} beforelinking
|
||||
.else
|
||||
${SHLIB_NAME}: ${SOBJS}
|
||||
.endif
|
||||
@${ECHO} building shared library ${SHLIB_NAME}
|
||||
@rm -f ${.TARGET} ${SHLIB_LINK}
|
||||
.if defined(SHLIB_LINK)
|
||||
|
@ -60,7 +60,11 @@ LDADD+= -lobjc -lpthread
|
||||
|
||||
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
||||
|
||||
${PROG}: ${OBJS}
|
||||
.if target(beforelinking)
|
||||
${PROG}: ${OBJS} beforelinking
|
||||
.else
|
||||
${PROG}: ${OBJS} beforelinking
|
||||
.endif
|
||||
.if defined(PROG_CXX)
|
||||
${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
|
||||
.else
|
||||
@ -86,7 +90,11 @@ SRCS= ${PROG}.c
|
||||
# - it's useful to keep objects around for crunching.
|
||||
OBJS= ${PROG}.o
|
||||
|
||||
.if target(beforelinking)
|
||||
${PROG}: ${OBJS} beforelinking
|
||||
.else
|
||||
${PROG}: ${OBJS}
|
||||
.endif
|
||||
.if defined(PROG_CXX)
|
||||
${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
|
||||
.else
|
||||
|
Loading…
Reference in New Issue
Block a user