Make sure to set OBJS consistently in the cases where SRCS is and isn't

already defined. Setting it with "+=" makes it possible for other make
scripts (e.g. bsd.dtrace.mk) to include additional object files in the
linker arguments.

Approved by:	emaste (co-mentor)
This commit is contained in:
Mark Johnston 2013-03-26 18:46:40 +00:00
parent 65c2474e6d
commit 7f7fc25b5a

View File

@ -73,7 +73,7 @@ SRCS= ${PROG}.c
# - the name of the object gets put into the executable symbol table instead of
# the name of a variable temporary object.
# - it's useful to keep objects around for crunching.
OBJS= ${PROG}.o
OBJS+= ${PROG}.o
.if target(beforelinking)
beforelinking: ${OBJS}