mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 20:40:10 +01:00
Use two levels of pthread support: a minimal level used to build cairo itself, and a full level to build threaded apps which want to use cairo. The minimal level tries to use pthread stubs from libc if possible, but falls back to the full level if that's not possible. We use CFLAGS=-D_REENTRANT LIBS=-lpthread to find a real pthread library since that seems to work on every unix-like test box we can get our hands on.
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
cairolibdir = $(libdir)/cairo
|
|
cairooutdir = $(localstatedir)/lib/cairo-trace
|
|
|
|
bin_SCRIPTS = cairo-trace
|
|
cairolib_LTLIBRARIES = libcairo-trace.la
|
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/src \
|
|
-I$(top_builddir)/src
|
|
|
|
libcairo_trace_la_SOURCES = trace.c
|
|
libcairo_trace_la_CPPFLAGS = -DCAIRO_TRACE_OUTDIR="\"$(cairooutdir)\"" \
|
|
$(AM_CPPFLAGS)
|
|
libcairo_trace_la_CFLAGS = $(CAIRO_CFLAGS) $(real_pthread_CFLAGS)
|
|
libcairo_trace_la_LDFLAGS = -no-undefined
|
|
|
|
libcairo_trace_la_LIBADD = $(real_pthread_LIBS) -lz
|
|
if CAIRO_HAS_DL
|
|
libcairo_trace_la_LIBADD += -ldl
|
|
endif
|
|
|
|
if CAIRO_HAS_SYMBOL_LOOKUP
|
|
libcairo_trace_la_SOURCES += \
|
|
lookup-symbol.c \
|
|
lookup-symbol.h
|
|
libcairo_trace_la_LIBADD += $(BFD_LIBS)
|
|
endif
|
|
|
|
|
|
system-install: install
|
|
-mkdir -p $(cairooutdir)
|
|
-chmod 01777 $(cairooutdir)
|
|
grep -sq $(cairolibdir)/libcairo-trace.so /etc/ld.so.preload || echo $(cairolibdir)/libcairo-trace.so >> /etc/ld.so.preload
|
|
|
|
system-uninstall: uninstall
|
|
sed -e '/libcairo-trace.so/d' < /etc/ld.so.preload > /tmp/ld.so.preload && mv /tmp/ld.so.preload /etc/ld.so.preload;
|
|
|
|
EXTRA_DIST = \
|
|
COPYING \
|
|
COPYING-GPL-3 \
|
|
cairo-trace.in
|