-lpthread is not always a valid flag to pull pthread support, especially
on Android it will fail to link due to a missing libpthread.so. The more
generic way to build-in pthread support is to use the -pthread CFLAG, so
let's use it instead.
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: rebase on top of previous commit]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
AM_CFLAGS = \
+ -pthread \
$(WARN_CFLAGS)\
-I $(top_srcdir)/include/drm \
-I $(top_srcdir)/libkms/ \
exynos_fimg2d_event_LDADD = \
$(top_builddir)/libdrm.la \
- $(top_builddir)/exynos/libdrm_exynos.la \
- -lpthread
+ $(top_builddir)/exynos/libdrm_exynos.la
exynos_fimg2d_test_LDADD = \
$(top_builddir)/libdrm.la \
AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS))
AM_CFLAGS += \
+ -pthread \
-I$(top_srcdir)/include/drm \
-I$(top_srcdir)/tests \
-I$(top_srcdir)
modetest_LDADD = \
$(top_builddir)/libdrm.la \
$(top_builddir)/tests/util/libutil.la \
- $(CAIRO_LIBS) \
- -lpthread
+ $(CAIRO_LIBS)
AM_CFLAGS = \
+ -pthread \
$(WARN_CFLAGS) \
-I$(top_srcdir)/include/drm \
-I$(top_srcdir)/nouveau \
LDADD = \
../../nouveau/libdrm_nouveau.la \
../../libdrm.la \
- -ldl -lpthread
+ -ldl
TESTS = threaded