i965/fs: Don't use brw->fragment_program in calculate_urb_setup().
[mesa.git] / src / mesa / Makefile.am
index bb70ed6ea36544ec8ea710495e4285d729437c08..57325afabf7532cd733cf4a7e39ceae51370cc97 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,33 +67,30 @@ 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) -v -d --output=program/program_parse.tab.c $<
 
 program/lex.yy.c: program/program_lexer.l
-       mkdir -p program
-       $(LEX) --never-interactive --outfile=$@ $<
-
-noinst_LTLIBRARIES = libmesa.la libmesagallium.la
+       $(MKDIR_P) program
+       $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
+
+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/
+BUILDDIR = $(top_builddir)/src/mesa/
 include sources.mak
 
 AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
@@ -107,12 +102,21 @@ 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 = \
@@ -131,13 +135,14 @@ libmesagallium_la_SOURCES = \
 libmesagallium_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
 libmesagallium_la_LDFLAGS =
 
+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
 pkgconfig_DATA = gl.pc