mesa/tests: Sanity check the ES2 dispatch table
[mesa.git] / src / mesa / Makefile.am
index 54c1bf8ad0d325e3e7bee09a57d7d1a1b4d5ec81..8e4530da306a86fd5cf275ab13031e13ba07066d 100644 (file)
@@ -39,21 +39,19 @@ 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 ;\
+       else \
+               rm main/git_sha1.h.tmp ;\
        fi
 
 # include glapi_gen.mk for generating glapi headers for GLES
-TOP = $(top_srcdir)
-GLAPI = $(TOP)/src/mapi/glapi/gen
+GLAPI = $(top_srcdir)/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
@@ -69,49 +67,56 @@ main/api_exec_es1_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_d
 
 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 \
+       $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/main/es_generator.py \
          -S $(srcdir)/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 $(srcdir)/main/APIspec.xml -V GLES2.0 > $@
-
 program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
-       mkdir -p program
-       $(YACC) -v -d --output=program/program_parse.tab.c $<
+       $(MKDIR_P) program
+       $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program/program_parse.tab.c $<
 
 program/lex.yy.c: program/program_lexer.l
-       mkdir -p program
-       $(LEX) --never-interactive --outfile=$@ $<
+       $(MKDIR_P) program
+       $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
 
-noinst_LTLIBRARIES = libmesa.la libmesagallium.la
+noinst_LTLIBRARIES =
+if NEED_LIBMESA
+noinst_LTLIBRARIES += libmesa.la
+else
+check_LTLIBRARIES = libmesa.la
+endif
+if HAVE_GALLIUM
+noinst_LTLIBRARIES += libmesagallium.la
+endif
 
-SRCDIR = $(top_srcdir)/src/mesa
+SRCDIR = $(top_srcdir)/src/mesa/
+BUILDDIR = $(top_builddir)/src/mesa/
 include sources.mak
 
-AM_CFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) $(CFLAGS)
-AM_CXXFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) $(CXXFLAGS)
+AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
+AM_CFLAGS = $(LLVM_CFLAGS)
+AM_CXXFLAGS = $(LLVM_CFLAGS)
 
 # cannot just add $(MESA_ASM_FILES) to libmesa_la_SOURCES as it contains a configure substitution
 MESA_ASM_FILES_FOR_ARCH =
 
 if HAVE_X86_ASM
 MESA_ASM_FILES_FOR_ARCH += $(X86_FILES)
+AM_CPPFLAGS += \
+        -I$(top_builddir)/src/mesa/x86 \
+        -I$(top_srcdir)/src/mesa/x86
 endif
 if HAVE_X86_64_ASM
 MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES)
+AM_CPPFLAGS += \
+        -I$(top_builddir)/src/mesa/x86-64 \
+        -I$(top_srcdir)/src/mesa/x86-64
 endif
 if HAVE_SPARC_ASM
 MESA_ASM_FILES_FOR_ARCH += $(SPARC_FILES)
+AM_CPPFLAGS += \
+        -I$(top_builddir)/src/mesa/sparc \
+        -I$(top_srcdir)/src/mesa/sparc
 endif
 
 libmesa_la_SOURCES = \
@@ -130,21 +135,18 @@ libmesagallium_la_SOURCES = \
 libmesagallium_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
 libmesagallium_la_LDFLAGS =
 
-install-exec-local:
-       $(MAKE) -f $(srcdir)/Makefile.old install
-
+if HAVE_GALLIUM
 # Provide compatibility with scripts for the old Mesa build system for
 # a while by putting a link to the library in the current directory.
-all-local: libmesa.la libmesagallium.la
-       ln -f .libs/libmesa.a .
+all-local: $(noinst_LTLIBRARIES)
        ln -f .libs/libmesagallium.a .
+endif
 
-CLEANFILES += libmesa.a libmesagallium.a
+CLEANFILES += libmesagallium.a
 
 pkgconfigdir = $(libdir)/pkgconfig
-
-if HAVE_OSMESA_DRIVER
-pkgconfig_DATA = osmesa.pc
-else
 pkgconfig_DATA = gl.pc
-endif
+
+# Emacs tags
+tags:
+       etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h