bdrewery 6c4b8e235b Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP.
Since buildenv exports SYSROOT all of these uses will now look in
WORLDTMP by default.

sys/boot/efi/loader/Makefile
        A LIBSTAND hack is no longer required for buildenv.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-19 20:47:24 +00:00

33 lines
972 B
Makefile

# $FreeBSD$
.include "${.CURDIR}/../Makefile.common"
.PATH: ${.CURDIR:H}
PLAIN_TESTS_CXX= zfsd_unittest
SRCS.zfsd_unittest:= ${SRCS:Nzfsd_main.cc}
SRCS.zfsd_unittest+= libmocks.c zfsd_unittest.cc
SRCS=
# Use #include <zfsd/xxx.h> in test programs.
INCFLAGS+= -I${.CURDIR:H:H}
.if defined(DESTDIR) || defined(SYSROOT)
INCFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include
LDFLAGS.zfsd_unittest+= -L${SYSROOT:U${DESTDIR}}/lib \
-L${SYSROOT:U${DESTDIR}}/usr/lib
.endif
# Googletest options
INCFLAGS+= -I${LOCALBASE}/include -D_THREAD_SAFE -pthread
LDFLAGS.zfsd_unittest+= -L${LOCALBASE}/lib -D_THREAD_SAFE -pthread
LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgtest.a
# GoogleMock options
LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgmock.a ${LOCALBASE}/lib/libgmock_main.a
# Googlemock fails if we don't have this line
# https://groups.google.com/forum/#!msg/googletestframework/h8ixEPCFm0o/amwfu4xGJb0J
CFLAGS.zfsd_unittest+= -DGTEST_HAS_PTHREAD
.include <bsd.test.mk>