mesa: Build program as part of libmesa.
authorMatt Turner <mattst88@gmail.com>
Mon, 4 Nov 2013 22:52:22 +0000 (14:52 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 6 Nov 2013 19:26:19 +0000 (11:26 -0800)
Makefile.am
configure.ac
src/mesa/Makefile.am
src/mesa/program/Makefile.am [deleted file]

index 343bade..361fb51 100644 (file)
@@ -64,7 +64,7 @@ IGNORE_FILES = \
 
 parsers: configure
        $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp glcpp/glcpp-lex.c glcpp/glcpp-parse.c glcpp/glcpp-parse.h
-       $(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h
+       $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
 
 # Everything for new a Mesa release:
 ARCHIVES = $(PACKAGE_NAME).tar.gz \
index 0a25047..bbdad83 100644 (file)
@@ -2096,7 +2096,6 @@ AC_CONFIG_FILES([Makefile
                src/mesa/drivers/x11/Makefile
                src/mesa/main/tests/Makefile
                src/mesa/main/tests/hash_table/Makefile
-               src/mesa/program/Makefile
                src/mesa/x86-64/Makefile
                src/mesa/x86/Makefile])
 
index 6ce31d2..a54b8ac 100644 (file)
@@ -19,7 +19,7 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
-SUBDIRS = program x86 x86-64 . main/tests
+SUBDIRS = x86 x86-64 . main/tests
 
 if HAVE_X11_DRIVER
 SUBDIRS += drivers/x11
@@ -59,11 +59,17 @@ main/git_sha1.h: main/git_sha1.h.tmp
 GLAPI = $(top_srcdir)/src/mapi/glapi/gen
 include $(GLAPI)/glapi_gen.mk
 
+BUILDDIR = $(builddir)/
+include Makefile.sources
+
 BUILT_SOURCES = \
        main/git_sha1.h \
-       main/get_hash.h
+       main/get_hash.h \
+       $(BUILDDIR)program/program_parse.tab.c \
+       $(BUILDDIR)program/lex.yy.c
 CLEANFILES = \
        $(BUILT_SOURCES) \
+       $(BUILDDIR)program/program_parse.tab.h \
        git_sha1.h.tmp
 
 GET_HASH_GEN = main/get_hash_generator.py
@@ -85,9 +91,6 @@ if HAVE_GALLIUM
 noinst_LTLIBRARIES += libmesagallium.la
 endif
 
-BUILDDIR = $(builddir)/
-include Makefile.sources
-
 AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
 AM_CFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CFLAGS)
 AM_CXXFLAGS = $(LLVM_CFLAGS) $(VISIBILITY_CXXFLAGS)
@@ -109,26 +112,33 @@ endif
 
 libmesa_la_SOURCES = \
        $(MESA_FILES) \
+       $(PROGRAM_FILES) \
         $(MESA_ASM_FILES_FOR_ARCH)
 
 libmesa_la_LIBADD = \
         $(top_builddir)/src/glsl/libglsl.la \
-        $(top_builddir)/src/mesa/program/libprogram.la \
         $()
-libmesa_la_LDFLAGS =
 
 libmesagallium_la_SOURCES = \
        $(MESA_GALLIUM_FILES) \
+       $(PROGRAM_FILES) \
         $(MESA_ASM_FILES_FOR_ARCH)
 
 libmesagallium_la_LIBADD = \
         $(top_builddir)/src/glsl/libglsl.la \
-        $(top_builddir)/src/mesa/program/libprogram.la \
         $()
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = gl.pc
 
+$(BUILDDIR)program/lex.yy.c: program/program_lexer.l
+       $(MKDIR_P) $(builddir)/program
+       $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
+
+$(BUILDDIR)program/program_parse.tab.c $(BUILDDIR)program/program_parse.tab.h: program/program_parse.y
+       $(MKDIR_P) $(builddir)/program
+       $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=$(BUILDDIR)program/program_parse.tab.c $<
+
 # Emacs tags
 tags:
        etags `find . -name \*.[ch]` $(top_srcdir)/include/GL/*.h
diff --git a/src/mesa/program/Makefile.am b/src/mesa/program/Makefile.am
deleted file mode 100644 (file)
index 5e05782..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright © 2012 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER 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.
-
-include ../Makefile.sources
-
-AM_CPPFLAGS = $(DEFINES) $(INCLUDE_DIRS)
-AM_CFLAGS = $(VISIBILITY_CFLAGS)
-AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
-
-SRCDIR = $(top_srcdir)/src/mesa/
-BUILDDIR = $(top_builddir)/src/mesa/
-
-noinst_LTLIBRARIES = libprogram.la
-
-libprogram_la_SOURCES = $(PROGRAM_FILES)
-
-lex.yy.c: program_lexer.l
-       $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
-
-program_parse.tab.c program_parse.tab.h: program_parse.y
-       $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program_parse.tab.c $<
-
-BUILT_SOURCES = \
-       program_parse.tab.c \
-       program_parse.tab.h \
-       lex.yy.c
-CLEANFILES = $(BUILT_SOURCES)