summaryrefslogtreecommitdiffstats
path: root/src/mesa/Makefile.am
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-11-04 14:52:22 -0800
committerMatt Turner <[email protected]>2013-11-06 11:26:19 -0800
commit5ca3926442361fb6e9ac75c7af63f37b94278ab7 (patch)
tree8e857afba4fd5ae0999f689cd63fa49a5c861040 /src/mesa/Makefile.am
parentb0bfb7c41ea0874d71530698ac9343936fc2e5bd (diff)
mesa: Build program as part of libmesa.
Diffstat (limited to 'src/mesa/Makefile.am')
-rw-r--r--src/mesa/Makefile.am26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 6ce31d2f81c..a54b8ac1b30 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -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