X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2FMakefile.am;h=e9c16e78ed491163947c7e50269cfc49e86d167e;hb=21b5bf712b47e03d21dfa2c93acb272b9b575fe7;hp=bada7601a8da7d3b0ca684fad88b1572d4f11460;hpb=876889b35502a110ca18c7325abe6e0727dc89f5;p=mesa.git diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am index bada7601a8d..e9c16e78ed4 100644 --- a/src/mesa/Makefile.am +++ b/src/mesa/Makefile.am @@ -19,7 +19,23 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -SUBDIRS = x86 x86-64 . libdricore drivers +if NEED_LIBDRICORE +DRICORE_SUBDIR = libdricore +endif + +SUBDIRS = program x86 x86-64 . $(DRICORE_SUBDIR) main/tests + +if HAVE_X11_DRIVER +SUBDIRS += drivers/x11 +endif + +if HAVE_DRI +SUBDIRS += drivers/dri +endif + +if HAVE_OSMESA +SUBDIRS += drivers/osmesa +endif gldir = $(includedir)/GL gl_HEADERS = $(top_srcdir)/include/GL/*.h @@ -39,73 +55,91 @@ 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 + main/get_hash.h 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 +GET_HASH_GEN = main/get_hash_generator.py -main/api_exec_es2_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps) - $(call glapi_gen_dispatch,$<,es2) +main/get_hash.h: $(GLAPI)/gl_and_es_API.xml main/get_hash_params.py \ + $(GET_HASH_GEN) Makefile + $(AM_V_GEN)set -e; \ + $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/$(GET_HASH_GEN) \ + -f $< > $@.tmp; \ + mv $@.tmp $@; -main/api_exec_es2_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps) - $(call glapi_gen_remap,$<,es2) +noinst_LTLIBRARIES = +if NEED_LIBMESA +noinst_LTLIBRARIES += libmesa.la +else +check_LTLIBRARIES = libmesa.la +endif +if HAVE_GALLIUM +noinst_LTLIBRARIES += libmesagallium.la +endif -main/api_exec_es2.o: main/api_exec_es2_dispatch.h main/api_exec_es2_remap_helper.h +SRCDIR = $(top_srcdir)/src/mesa/ +BUILDDIR = $(top_builddir)/src/mesa/ +include Makefile.sources -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 $(srcdir)/main/APIspec.xml -V GLES1.1 > $@ +AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS) +AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS) +AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS) -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 > $@ +MESA_ASM_FILES_FOR_ARCH = -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 $< +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 -program/lex.yy.c: program/program_lexer.l - mkdir -p program - $(LEX) --never-interactive --outfile=$@ $< +libmesa_la_SOURCES = \ + $(MESA_FILES) \ + $(MESA_ASM_FILES_FOR_ARCH) -all-local: - $(MAKE) -f $(srcdir)/Makefile.old +libmesa_la_LIBADD = \ + $(top_builddir)/src/glsl/libglsl.la \ + $(top_builddir)/src/mesa/program/libprogram.la \ + $() +libmesa_la_LDFLAGS = -install-exec-local: - $(MAKE) -f $(srcdir)/Makefile.old install +libmesagallium_la_SOURCES = \ + $(MESA_GALLIUM_FILES) \ + $(MESA_ASM_FILES_FOR_ARCH) -clean-local: - $(MAKE) -f $(srcdir)/Makefile.old clean +libmesagallium_la_LIBADD = \ + $(top_builddir)/src/glsl/libglsl.la \ + $(top_builddir)/src/mesa/program/libprogram.la \ + $() 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_srcdir)/include/GL/*.h