src/mesa/drivers/x11/Makefile
src/mesa/libdricore/Makefile
src/mesa/main/tests/Makefile
+ src/mesa/program/Makefile
src/mesa/x86-64/Makefile
src/mesa/x86/Makefile])
# This is the list of auto-generated files: sources and headers
sources := \
main/enums.c \
- main/api_exec.c \
- program/program_parse.tab.c \
- program/lex.yy.c \
main/dispatch.h \
main/remap_helper.h \
main/get_hash.h
$(wildcard $(glapi)/*.py) \
$(wildcard $(glapi)/*.xml)
-define local-l-to-c
- @mkdir -p $(dir $@)
- @echo "Mesa Lex: $(PRIVATE_MODULE) <= $<"
- $(hide) $(LEX) -o$@ $<
-endef
-
-define mesa_local-y-to-c-and-h
- @mkdir -p $(dir $@)
- @echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
- $(hide) $(YACC) -o $@ -p "_mesa_program_" $<
-endef
-
define es-gen
@mkdir -p $(dir $@)
@echo "Gen ES: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@
endef
-$(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program/program_parse.y
- $(mesa_local-y-to-c-and-h)
-
-$(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program/program_lexer.l
- $(local-l-to-c)
-
$(intermediates)/main/git_sha1.h:
@mkdir -p $(dir $@)
@echo "GIT-SHA1: $(PRIVATE_MODULE) <= git"
$(patsubst %,-DFEATURE_%=1,$(MESA_ENABLED_APIS))
LOCAL_C_INCLUDES := \
+ $(call intermediates-dir-for STATIC_LIBRARIES,libmesa_program,,) \
$(MESA_TOP)/src/mapi \
$(MESA_TOP)/src/glsl
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libmesa_program
+
include $(LOCAL_PATH)/Android.gen.mk
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
endif # MESA_ENABLE_ASM
LOCAL_C_INCLUDES := \
+ $(call intermediates-dir-for STATIC_LIBRARIES,libmesa_program,,) \
$(MESA_TOP)/src/gallium/auxiliary \
$(MESA_TOP)/src/gallium/include \
$(MESA_TOP)/src/glsl \
$(MESA_TOP)/src/mapi
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+ libmesa_program
+
include $(LOCAL_PATH)/Android.gen.mk
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
include $(LOCAL_PATH)/Android.libmesa_glsl_utils.mk
include $(LOCAL_PATH)/Android.libmesa_dricore.mk
include $(LOCAL_PATH)/Android.libmesa_st_mesa.mk
+
+include $(LOCAL_PATH)/program/Android.mk
DRICORE_SUBDIR = libdricore
endif
-SUBDIRS = x86 x86-64 . $(DRICORE_SUBDIR) drivers
+SUBDIRS = program x86 x86-64 . $(DRICORE_SUBDIR) drivers
gldir = $(includedir)/GL
gl_HEADERS = $(top_srcdir)/include/GL/*.h
BUILT_SOURCES = \
main/git_sha1.h \
- main/get_hash.h \
- 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
-program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
- $(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
- $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $<
-
GET_HASH_GEN = main/get_hash_generator.py
GET_HASH_GEN_FLAGS := $(patsubst -DFEATURE_%=1,-a %, \
$(patsubst -DFEATURE_%=0,,$(API_DEFINES)))
$(MESA_FILES) \
$(MESA_ASM_FILES_FOR_ARCH)
-libmesa_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
+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) \
$(MESA_ASM_FILES_FOR_ARCH)
-libmesagallium_la_LIBADD = $(top_builddir)/src/glsl/libglsl.la
+libmesagallium_la_LIBADD = \
+ $(top_builddir)/src/glsl/libglsl.la \
+ $(top_builddir)/src/mesa/program/libprogram.la \
+ $()
+
libmesagallium_la_LDFLAGS =
if HAVE_GALLIUM
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
$(top_builddir)/src/glsl/builtin_function.cpp
libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
-libdricore@VERSION@_la_LIBADD = libdricore-asm.la
+libdricore@VERSION@_la_LIBADD = \
+ ../program/libdricore_program.la \
+ libdricore-asm.la
# This is separated from libdricore to avoid conflics in object
# outputs between main/clip.c and sparc/clip.c. The documented way to
+/Makefile
program_parse.output
lex.yy.c
program_parse.tab.c
--- /dev/null
+# 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 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.
+
+LOCAL_PATH := $(call my-dir)
+
+define local-l-to-c
+ @mkdir -p $(dir $@)
+ @echo "Mesa Lex: $(PRIVATE_MODULE) <= $<"
+ $(hide) $(LEX) -o$@ $<
+endef
+
+define mesa_local-y-to-c-and-h
+ @mkdir -p $(dir $@)
+ @echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
+ $(hide) $(YACC) -o $@ -p "_mesa_program_" $<
+endef
+
+# ----------------------------------------------------------------------
+# libmesa_program.a
+# ----------------------------------------------------------------------
+
+# Import the following variables:
+# PROGRAM_FILES
+include $(MESA_TOP)/src/mesa/sources.mak
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_program
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+intermediates := $(call local-intermediates-dir)
+
+MESA_ENABLED_APIS := ES1 ES2
+
+# TODO(chadv): In sources.mak, move these vars to a different list so we can
+# remove this kludge.
+generated_sources_basenames := \
+ lex.yy.c \
+ program_parse.tab.c \
+ program_parse.tab.h
+
+LOCAL_SRC_FILES := \
+ $(filter-out $(generated_sources_basenames),$(subst program/,,$(PROGRAM_FILES)))
+
+LOCAL_GENERATED_SOURCES := \
+ $(addprefix $(intermediates)/program/,$(generated_sources_basenames))
+
+$(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program_parse.y
+ $(mesa_local-y-to-c-and-h)
+
+$(intermediates)/program/program_parse.tab.h: $(LOCAL_PATH)/program_parse.y
+ $(mesa_local-y-to-c-and-h)
+
+$(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program_lexer.l
+ $(local-l-to-c)
+
+LOCAL_CFLAGS := \
+ $(patsubst %,-DFEATURE_%=1,$(MESA_ENABLED_APIS))
+
+LOCAL_C_INCLUDES := \
+ $(intermediates) \
+ $(MESA_TOP)/src/mapi \
+ $(MESA_TOP)/src/mesa \
+ $(MESA_TOP)/src/glsl
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
--- /dev/null
+# 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 ../sources.mak
+
+AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
+AM_CFLAGS = $(VISIBILITY_CFLAGS)
+AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
+libdricore_program_la_CFLAGS = $(NOVISIBILITY_CFLAGS)
+libdricore_program_la_CXXFLAGS = $(NOVISIBILITY_CXXFLAGS)
+
+SRCDIR = $(top_srcdir)/src/mesa/
+BUILDDIR = $(top_builddir)/src/mesa/
+
+if NEED_LIBDRICORE
+DRICORE_LIB = libdricore_program.la
+endif
+
+noinst_LTLIBRARIES = $(DRICORE_LIB)
+if NEED_LIBMESA
+noinst_LTLIBRARIES += libprogram.la
+else
+check_LTLIBRARIES = libprogram.la
+endif
+
+libprogram_la_SOURCES = $(PROGRAM_FILES)
+libdricore_program_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)
$(MATH_XFORM_FILES) \
$(VBO_FILES) \
$(TNL_FILES) \
- $(PROGRAM_FILES) \
$(SWRAST_FILES) \
$(SWRAST_SETUP_FILES) \
$(COMMON_DRIVER_FILES)\
$(MATH_FILES) \
$(VBO_FILES) \
$(STATETRACKER_FILES) \
- $(PROGRAM_FILES) \
$(SRCDIR)x86/common_x86.c
# All the core C sources, for dependency checking