summaryrefslogtreecommitdiffstats
path: root/src/mesa/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/Makefile.am')
-rw-r--r--src/mesa/Makefile.am65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 5e764cddc9f..e52678d5831 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -24,6 +24,71 @@ SUBDIRS = x86 x86-64 . libdricore drivers
gldir = $(includedir)/GL
gl_HEADERS = $(top_srcdir)/include/GL/*.h
+.PHONY: main/git_sha1.h.tmp
+main/git_sha1.h.tmp:
+ @touch main/git_sha1.h.tmp
+ @if test -d ../../.git; then \
+ if which git > /dev/null; then \
+ git log -n 1 --oneline | \
+ sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
+ > main/git_sha1.h.tmp ; \
+ fi \
+ fi
+
+main/git_sha1.h: main/git_sha1.h.tmp
+ @echo "updating main/git_sha1.h"
+ @if ! cmp -s main/git_sha1.h.tmp main/git_sha1.h; then \
+ mv main/git_sha1.h.tmp main/git_sha1.h ;\
+ fi
+
+# include glapi_gen.mk for generating glapi headers for GLES
+TOP = $(top_srcdir)
+GLAPI = $(TOP)/src/mapi/glapi/gen
+include $(GLAPI)/glapi_gen.mk
+
+BUILT_SOURCES = \
+ main/git_sha1.h \
+ main/api_exec_es1_dispatch.h \
+ main/api_exec_es1_remap_helper.h \
+ main/api_exec_es2_dispatch.h \
+ main/api_exec_es2_remap_helper.h \
+ main/api_exec_es1.c \
+ main/api_exec_es2.c \
+ program/program_parse.tab.c \
+ program/program_parse.tab.h \
+ program/lex.yy.c
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ git_sha1.h.tmp
+
+main/api_exec_es1_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps)
+ $(call glapi_gen_dispatch,$<,es1)
+
+main/api_exec_es1_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps)
+ $(call glapi_gen_remap,$<,es1)
+
+main/api_exec_es1.o: main/api_exec_es1_dispatch.h main/api_exec_es1_remap_helper.h
+
+main/api_exec_es2_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps)
+ $(call glapi_gen_dispatch,$<,es2)
+
+main/api_exec_es2_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps)
+ $(call glapi_gen_remap,$<,es2)
+
+main/api_exec_es2.o: main/api_exec_es2_dispatch.h main/api_exec_es2_remap_helper.h
+
+main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
+ $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@
+
+main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
+ $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@
+
+program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
+ $(YACC) -v -d --output=program/program_parse.tab.c $<
+
+program/lex.yy.c: program/program_lexer.l
+ $(LEX) --never-interactive --outfile=$@ $<
+
all-local:
$(MAKE) -f Makefile.old