d0b3ff3becfb04b96a17f98b1d6af9c09782fa1e
[mesa.git] / src / glsl / Android.mk
1 # Mesa 3-D graphics library
2 #
3 # Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
4 # Copyright (C) 2010-2011 LunarG Inc.
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a
7 # copy of this software and associated documentation files (the "Software"),
8 # to deal in the Software without restriction, including without limitation
9 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 # and/or sell copies of the Software, and to permit persons to whom the
11 # Software is furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 # DEALINGS IN THE SOFTWARE.
23
24 # Android.mk for glsl
25
26 LOCAL_PATH := $(call my-dir)
27
28 # from Makefile
29 LIBGLCPP_SOURCES = \
30 glcpp/glcpp-lex.c \
31 glcpp/glcpp-parse.c \
32 glcpp/pp.c
33
34 C_SOURCES = \
35 strtod.c \
36 ralloc.c \
37 $(LIBGLCPP_SOURCES)
38
39 CXX_SOURCES = \
40 ast_expr.cpp \
41 ast_function.cpp \
42 ast_to_hir.cpp \
43 ast_type.cpp \
44 glsl_lexer.cpp \
45 glsl_parser.cpp \
46 glsl_parser_extras.cpp \
47 glsl_types.cpp \
48 glsl_symbol_table.cpp \
49 hir_field_selection.cpp \
50 ir_basic_block.cpp \
51 ir_clone.cpp \
52 ir_constant_expression.cpp \
53 ir.cpp \
54 ir_expression_flattening.cpp \
55 ir_function_can_inline.cpp \
56 ir_function_detect_recursion.cpp \
57 ir_function.cpp \
58 ir_hierarchical_visitor.cpp \
59 ir_hv_accept.cpp \
60 ir_import_prototypes.cpp \
61 ir_print_visitor.cpp \
62 ir_reader.cpp \
63 ir_rvalue_visitor.cpp \
64 ir_set_program_inouts.cpp \
65 ir_validate.cpp \
66 ir_variable.cpp \
67 ir_variable_refcount.cpp \
68 linker.cpp \
69 link_functions.cpp \
70 loop_analysis.cpp \
71 loop_controls.cpp \
72 loop_unroll.cpp \
73 lower_discard.cpp \
74 lower_if_to_cond_assign.cpp \
75 lower_instructions.cpp \
76 lower_jumps.cpp \
77 lower_mat_op_to_vec.cpp \
78 lower_noise.cpp \
79 lower_texture_projection.cpp \
80 lower_variable_index_to_cond_assign.cpp \
81 lower_vec_index_to_cond_assign.cpp \
82 lower_vec_index_to_swizzle.cpp \
83 lower_vector.cpp \
84 opt_algebraic.cpp \
85 opt_constant_folding.cpp \
86 opt_constant_propagation.cpp \
87 opt_constant_variable.cpp \
88 opt_copy_propagation.cpp \
89 opt_copy_propagation_elements.cpp \
90 opt_dead_code.cpp \
91 opt_dead_code_local.cpp \
92 opt_dead_functions.cpp \
93 opt_discard_simplification.cpp \
94 opt_function_inlining.cpp \
95 opt_if_simplification.cpp \
96 opt_noop_swizzle.cpp \
97 opt_redundant_jumps.cpp \
98 opt_structure_splitting.cpp \
99 opt_swizzle_swizzle.cpp \
100 opt_tree_grafting.cpp \
101 s_expression.cpp
102
103 # ---------------------------------------
104 # Build libmesa_glsl
105 # ---------------------------------------
106
107 include $(CLEAR_VARS)
108
109 LOCAL_SRC_FILES := \
110 $(C_SOURCES) \
111 $(CXX_SOURCES) \
112 builtin_function.cpp
113
114 LOCAL_C_INCLUDES := \
115 $(MESA_TOP)/src/mapi \
116 $(MESA_TOP)/src/mesa
117
118 LOCAL_MODULE := libmesa_glsl
119
120 include $(LOCAL_PATH)/Android.gen.mk
121 include $(MESA_COMMON_MK)
122 include $(BUILD_STATIC_LIBRARY)
123
124 # ---------------------------------------
125 # Build mesa_builtin_compiler for host
126 # ---------------------------------------
127
128 include $(CLEAR_VARS)
129
130 LOCAL_SRC_FILES := \
131 $(C_SOURCES) \
132 $(CXX_SOURCES) \
133 builtin_stubs.cpp \
134 main.cpp \
135 standalone_scaffolding.cpp
136
137 LOCAL_C_INCLUDES := \
138 $(MESA_TOP)/src/mapi \
139 $(MESA_TOP)/src/mesa
140
141 LOCAL_STATIC_LIBRARIES := libmesa_glsl_utils
142
143 LOCAL_MODULE := mesa_builtin_compiler
144
145 LOCAL_MODULE_CLASS := EXECUTABLES
146 LOCAL_IS_HOST_MODULE := true
147 include $(LOCAL_PATH)/Android.gen.mk
148 include $(MESA_COMMON_MK)
149 include $(BUILD_HOST_EXECUTABLE)
150
151 # ---------------------------------------
152 # Build glsl_compiler
153 # ---------------------------------------
154
155 include $(CLEAR_VARS)
156
157 LOCAL_SRC_FILES := \
158 main.cpp \
159 standalone_scaffolding.cpp
160
161 LOCAL_C_INCLUDES := \
162 $(MESA_TOP)/src/mapi \
163 $(MESA_TOP)/src/mesa
164
165 LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_glsl_utils
166
167 LOCAL_MODULE_TAGS := eng
168 LOCAL_MODULE := glsl_compiler
169
170 include $(MESA_COMMON_MK)
171 include $(BUILD_EXECUTABLE)