summaryrefslogtreecommitdiff
path: root/util/cairo-trace/Makefile.am
blob: 814a0f005d66052f589a450584463528d89b82b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cairolibdir = $(libdir)/cairo
cairooutdir = $(localstatedir)/lib/cairo-trace

bin_SCRIPTS = cairo-trace
cairolib_LTLIBRARIES = cairo-trace.la

AM_CPPFLAGS = -I$(top_srcdir)/src \
	      -I$(top_builddir)/src

cairo_trace_la_SOURCES = trace.c
cairo_trace_la_CPPFLAGS = -DCAIRO_TRACE_OUTDIR="\"$(cairooutdir)\"" \
			  $(AM_CPPFLAGS)
cairo_trace_la_CFLAGS = $(CAIRO_CFLAGS)
cairo_trace_la_LDFLAGS = -module -no-undefined

cairo_trace_la_LIBADD = -lz
if CAIRO_HAS_DL
cairo_trace_la_LIBADD += -ldl
endif

if CAIRO_HAS_SYMBOL_LOOKUP
cairo_trace_la_SOURCES += \
			 lookup-symbol.c \
			 lookup-symbol.h
cairo_trace_la_LIBADD += $(BFD_LIBS)
endif


system-install: install
	-mkdir -p $(cairooutdir)
	-chmod 01777 $(cairooutdir)
	grep -sq $(cairolibdir)/cairo-trace.so /etc/ld.so.preload || echo $(cairolibdir)/cairo-trace.so >> /etc/ld.so.preload

system-uninstall: uninstall
	sed -e '/cairo-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