diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-11-13 15:06:29 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-11-13 15:06:29 -0500 |
commit | d8c8bf19aa2cce3257f3fc28c384d5fbf798ad77 (patch) | |
tree | 888ea6cedbbed8d62d06d0e8afd8bdc1a9e3395a /libdimension | |
parent | 529f40fc3f0f5f4cc7726be8f59e28e0da161e49 (diff) | |
download | dimension-d8c8bf19aa2cce3257f3fc28c384d5fbf798ad77.tar.xz |
PGO build improvements.
Diffstat (limited to 'libdimension')
-rw-r--r-- | libdimension/Makefile.am | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libdimension/Makefile.am b/libdimension/Makefile.am index 274cbf3..e67f09e 100644 --- a/libdimension/Makefile.am +++ b/libdimension/Makefile.am @@ -67,10 +67,20 @@ libdimension_la_LDFLAGS = -version-info 0:0:0 libdimension_la_LIBADD = -lm -lpthread -lpng -lGL if PGO -EXTRA_LTLIBRARIES = libdimension-pgo.la + +noinst_LTLIBRARIES = libdimension-pgo.la libdimension_pgo_la_SOURCES = $(libdimension_la_SOURCES) libdimension_pgo_la_LIBADD = $(libdimension_la_LIBADD) -lgcov -libdimension_pgo_la_CFLAGS = -fprofile-generate=./pgo +libdimension_pgo_la_CFLAGS = -fprofile-generate=$$(readlink -f $(builddir))/pgo + +libdimension_la_CFLAGS = -fprofile-correction -fprofile-use=./pgo + +all-local: libdimension.la + @for Plo in .deps/libdimension_la*.Plo; do \ + [ -f "pgo/.libs/$$(basename $$Plo .Plo).gcda" ] && sed -ri 's|^(libdimension_la-.*).lo: ([^ ])|\1.lo: pgo/.libs/\1.gcda \2|g' "$$Plo"; \ + true; \ + done -libdimension_la_CFLAGS = -fprofile-correction -fprofile-use=$(top_builddir)/tests/libdimension/pgo +clean-local: + rm -rf pgo endif |