summaryrefslogtreecommitdiff
path: root/dix/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'dix/Makefile.am')
-rw-r--r--dix/Makefile.am20
1 files changed, 19 insertions, 1 deletions
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 724d1d1f6..d0d6e8785 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -38,4 +38,22 @@ libxpstubs_la_SOURCES = \
INCLUDES = -I$(top_srcdir)/Xprint
-EXTRA_DIST = buildatoms BuiltInAtoms CHANGES
+EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in
+
+if XSERVER_DTRACE
+# Generate dtrace header file for C sources to include
+BUILT_SOURCES = Xserver-dtrace.h
+
+Xserver-dtrace.h: $(srcdir)/Xserver.d
+ $(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \
+ || cp Xserver-dtrace.h.in $@
+
+# Generate dtrace object code for probes in libdix
+dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS)
+ $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o
+
+noinst_LIBRARIES = dix.O
+
+dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS)
+ ld -r -o $@ .libs/*.o
+endif