summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am38
1 files changed, 33 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 5ea0fd87..9949679b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
# Copyright © 2005 Adam Jackson.
-# Copyright © 2009 Intel Corporation
+# Copyright © 2009,2013 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -19,19 +19,47 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
+ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
-SUBDIRS = lib man tools scripts tests benchmarks demos
+SUBDIRS = docs lib man tools scripts benchmarks demos overlay
+
+if BUILD_ASSEMBLER
+SUBDIRS += assembler
+endif
if BUILD_SHADER_DEBUGGER
SUBDIRS += debugger
endif
-test:
- ${MAKE} -C tests test
+if BUILD_TESTS
+SUBDIRS += tests
+endif
MAINTAINERCLEANFILES = ChangeLog INSTALL
+.PHONY: version.h.tmp
+version.h.tmp:
+ @touch $@
+ @if test -d .git; then \
+ if which git > /dev/null; then git log -n 1 --oneline | \
+ sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' \
+ >> $@ ; \
+ fi \
+ else \
+ echo '#define IGT_GIT_SHA1 "NOT-GIT"' >> $@ ; \
+ fi
+
+version.h: version.h.tmp
+ @echo "updating version.h"
+ @if ! cmp -s version.h.tmp version.h; then \
+ mv version.h.tmp version.h ;\
+ else \
+ rm version.h.tmp ;\
+ fi
+
+BUILT_SOURCES = version.h
+CLEANFILES = version.h version.h.tmp
+
.PHONY: ChangeLog INSTALL
INSTALL: