6 include $(TOP
)/configs
/current
32 glsl_parser_extras.
cpp \
34 glsl_symbol_table.
cpp \
35 hir_field_selection.
cpp \
38 ir_constant_expression.
cpp \
40 ir_expression_flattening.
cpp \
41 ir_function_can_inline.
cpp \
42 ir_function_detect_recursion.
cpp \
44 ir_hierarchical_visitor.
cpp \
46 ir_import_prototypes.
cpp \
47 ir_print_visitor.
cpp \
49 ir_rvalue_visitor.
cpp \
50 ir_set_program_inouts.
cpp \
53 ir_variable_refcount.
cpp \
60 lower_if_to_cond_assign.
cpp \
61 lower_instructions.
cpp \
63 lower_mat_op_to_vec.
cpp \
65 lower_texture_projection.
cpp \
66 lower_variable_index_to_cond_assign.
cpp \
67 lower_vec_index_to_cond_assign.
cpp \
68 lower_vec_index_to_swizzle.
cpp \
71 opt_constant_folding.
cpp \
72 opt_constant_propagation.
cpp \
73 opt_constant_variable.
cpp \
74 opt_copy_propagation.
cpp \
75 opt_copy_propagation_elements.
cpp \
77 opt_dead_code_local.
cpp \
78 opt_dead_functions.
cpp \
79 opt_discard_simplification.
cpp \
80 opt_function_inlining.
cpp \
81 opt_if_simplification.
cpp \
82 opt_noop_swizzle.
cpp \
83 opt_redundant_jumps.
cpp \
84 opt_structure_splitting.
cpp \
85 opt_swizzle_swizzle.
cpp \
86 opt_tree_grafting.
cpp \
90 $(TOP
)/src
/glsl
/libglsl.a
92 APPS
= glsl_compiler glsl_test glcpp
/glcpp
95 ..
/mesa
/program
/hash_table.c \
96 ..
/mesa
/program
/symbol_table.c
99 standalone_scaffolding.
cpp
102 $(GLSL2_C_SOURCES
:.c
=.o
) \
103 $(GLSL2_CXX_SOURCES
:.
cpp=.o
)
106 ..
/mesa
/program
/hash_table.c \
107 ..
/mesa
/program
/symbol_table.c
110 standalone_scaffolding.
cpp \
115 $(TEST_C_SOURCES
:.c
=.o
) \
116 $(TEST_CXX_SOURCES
:.
cpp=.o
)
118 ### Basic defines ###
125 $(GLCPP_SOURCES
:.c
=.o
) \
126 ..
/mesa
/program
/hash_table.o
130 $(CXX_SOURCES
:.
cpp=.o
)
132 DRICORE_OBJ_DIR
= obj-visible
133 OBJECTS_DRICORE
= $(addprefix $(DRICORE_OBJ_DIR
)/,$(OBJECTS
))
145 $(GLSL2_CXX_SOURCES
) \
147 $(TEST_CXX_SOURCES
) \
152 default
: depend lib
$(LIBNAME
).a
$(APPS
) $(DRICORE_GLSL_LIBS
)
154 $(TOP
)/$(LIB_DIR
)/libglsl.so
: $(OBJECTS_DRICORE
) builtin_function.o Makefile
$(TOP
)/src
/glsl
/Makefile.template
155 $(MKLIB
) -o
$@
-linker
'$(CXX)' -ldflags '$(LDFLAGS)' \
156 -cplusplus
-noprefix \
157 -install $(TOP
)/$(LIB_DIR
) -id
$(INSTALL_LIB_DIR
)/$@.dylib \
158 $(OBJECTS_DRICORE
) builtin_function.o
160 lib
$(LIBNAME
).a
: $(OBJECTS
) builtin_function.o Makefile
$(TOP
)/src
/glsl
/Makefile.template
161 $(MKLIB
) -cplusplus
-o
$(LIBNAME
) -static
$(OBJECTS
) builtin_function.o
163 depend
: $(ALL_SOURCES
) Makefile
166 $(MKDEP
) $(MKDEP_OPTIONS
) $(INCLUDES
) $(ALL_SOURCES
) 2> /dev
/null
167 $(MKDEP
) $(MKDEP_OPTIONS
) -a
-p
$(DRICORE_OBJ_DIR
)/ $(INCLUDES
) $(ALL_SOURCES
) 2> /dev
/null
169 # Remove .o and backup files
171 rm -f
$(GLCPP_OBJECTS
) $(GLSL2_OBJECTS
) $(TEST_OBJECTS
) $(OBJECTS
) lib
$(LIBNAME
).a depend depend.bak builtin_function.
cpp builtin_function.o builtin_stubs.o builtin_compiler
175 -rm -f
$(OBJECTS_DRICORE
) $(TOP
)/$(LIB_DIR
)/libglsl.so libglsl.so
177 ifneq (,$(DRICORE_GLSL_LIBS
))
178 DRICORE_INSTALL_TARGET
= install-dricore
182 install: $(DRICORE_INSTALL_TARGET
)
185 install-dricore
: default
186 $(INSTALL
) -d
$(DESTDIR
)$(DRI_DRIVER_INSTALL_DIR
)
187 $(INSTALL
) -m
755 $(DRICORE_GLSL_LIBS
) $(DESTDIR
)$(DRI_DRIVER_INSTALL_DIR
)
191 glsl_compiler
: $(GLSL2_OBJECTS
) libglsl.a
192 $(APP_CXX
) $(INCLUDES
) $(CFLAGS
) $(LDFLAGS
) $(GLSL2_OBJECTS
) $(LIBS
) -o
$@
194 glsl_test
: $(TEST_OBJECTS
) libglsl.a
195 $(APP_CXX
) $(INCLUDES
) $(CFLAGS
) $(LDFLAGS
) $(TEST_OBJECTS
) $(LIBS
) -o
$@
198 glcpp
/glcpp
: $(GLCPP_OBJECTS
)
199 $(APP_CC
) $(INCLUDES
) $(CFLAGS
) $(LDFLAGS
) $(GLCPP_OBJECTS
) -o
$@
202 $(CXX
) -c
$(INCLUDES
) $(CXXFLAGS
) $(DEFINES
) $< -o
$@
205 $(CC
) -c
$(INCLUDES
) $(CFLAGS
) $(DEFINES
) $< -o
$@
207 $(DRICORE_OBJ_DIR
)/%.o
: %.
cpp
209 $(CXX
) -c
$(INCLUDES
) $(DRI_CXXFLAGS
) $(DEFINES
) $< -o
$@
211 $(DRICORE_OBJ_DIR
)/%.o
: %.c
213 $(CC
) -c
$(INCLUDES
) $(DRI_CFLAGS
) $(DEFINES
) $< -o
$@
215 glsl_lexer.
cpp: glsl_lexer.ll
216 $(FLEX
) --nounistd
-o
$@
$<
218 glsl_parser.
cpp: glsl_parser.yy
219 $(BISON
) -v
-o
"$@" -p
"_mesa_glsl_" --defines
=glsl_parser.h
$<
221 glcpp
/glcpp-lex.c
: glcpp
/glcpp-lex.l
222 $(FLEX
) --nounistd
-o
$@
$<
224 glcpp
/glcpp-parse.c
: glcpp
/glcpp-parse.y
225 $(BISON
) -v
-o
"$@" --defines
=glcpp
/glcpp-parse.h
$<
227 builtin_compiler
: $(GLSL2_OBJECTS
) $(OBJECTS
) builtin_stubs.o
228 $(APP_CXX
) $(INCLUDES
) $(CXXFLAGS
) $(LDFLAGS
) $(OBJECTS
) $(GLSL2_OBJECTS
) builtin_stubs.o
-o
$@
230 builtin_function.
cpp: builtins
/profiles
/* builtins
/ir
/* builtins
/tools
/generate_builtins.py builtins
/tools
/texture_builtins.py builtin_compiler
231 @echo Regenerating builtin_function.
cpp...
232 $(PYTHON2
) $(PYTHON_FLAGS
) builtins
/tools
/generate_builtins.py .
/builtin_compiler
> builtin_function.
cpp ||
rm -f builtin_function.
cpp