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 glcpp
/glcpp
95 ..
/mesa
/program
/hash_table.c \
96 ..
/mesa
/program
/symbol_table.c
101 $(GLSL2_C_SOURCES
:.c
=.o
) \
102 $(GLSL2_CXX_SOURCES
:.
cpp=.o
)
104 ### Basic defines ###
111 $(GLCPP_SOURCES
:.c
=.o
) \
112 ..
/mesa
/program
/hash_table.o
116 $(CXX_SOURCES
:.
cpp=.o
)
118 DRICORE_OBJ_DIR
= obj-visible
119 OBJECTS_DRICORE
= $(addprefix $(DRICORE_OBJ_DIR
)/,$(OBJECTS
))
131 $(GLSL2_CXX_SOURCES
) \
136 default
: depend lib
$(LIBNAME
).a
$(APPS
) $(DRICORE_GLSL_LIBS
)
138 $(TOP
)/$(LIB_DIR
)/libglsl.so
: $(OBJECTS_DRICORE
) builtin_function.o Makefile
$(TOP
)/src
/glsl
/Makefile.template
139 $(MKLIB
) -o
$@
-linker
'$(CXX)' -ldflags '$(LDFLAGS)' \
140 -cplusplus
-noprefix \
141 -install $(TOP
)/$(LIB_DIR
) -id
$(INSTALL_LIB_DIR
)/$@.dylib \
142 $(OBJECTS_DRICORE
) builtin_function.o
144 lib
$(LIBNAME
).a
: $(OBJECTS
) builtin_function.o Makefile
$(TOP
)/src
/glsl
/Makefile.template
145 $(MKLIB
) -cplusplus
-o
$(LIBNAME
) -static
$(OBJECTS
) builtin_function.o
147 depend
: $(ALL_SOURCES
) Makefile
150 $(MKDEP
) $(MKDEP_OPTIONS
) $(INCLUDES
) $(ALL_SOURCES
) 2> /dev
/null
152 # Remove .o and backup files
154 rm -f
$(GLCPP_OBJECTS
) $(GLSL2_OBJECTS
) $(OBJECTS
) lib
$(LIBNAME
).a depend depend.bak builtin_function.
cpp builtin_function.o builtin_stubs.o builtin_compiler
158 -rm -f
$(OBJECTS_DRICORE
) $(TOP
)/$(LIB_DIR
)/libglsl.so libglsl.so
160 ifneq (,$(DRICORE_GLSL_LIBS
))
161 DRICORE_INSTALL_TARGET
= install-dricore
165 install: $(DRICORE_INSTALL_TARGET
)
168 install-dricore
: default
169 $(INSTALL
) -d
$(DESTDIR
)$(DRI_DRIVER_INSTALL_DIR
)
170 $(INSTALL
) -m
755 $(DRICORE_GLSL_LIBS
) $(DESTDIR
)$(DRI_DRIVER_INSTALL_DIR
)
174 glsl_compiler
: $(GLSL2_OBJECTS
) libglsl.a builtin_stubs.o
175 $(APP_CXX
) $(INCLUDES
) $(CFLAGS
) $(LDFLAGS
) $(GLSL2_OBJECTS
) builtin_stubs.o
$(LIBS
) -o
$@
178 glcpp
/glcpp
: $(GLCPP_OBJECTS
)
179 $(APP_CC
) $(INCLUDES
) $(CFLAGS
) $(LDFLAGS
) $(GLCPP_OBJECTS
) -o
$@
182 $(CXX
) -c
$(INCLUDES
) $(CXXFLAGS
) $(DEFINES
) $< -o
$@
185 $(CC
) -c
$(INCLUDES
) $(CFLAGS
) $(DEFINES
) $< -o
$@
187 $(DRICORE_OBJ_DIR
)/%.o
: %.
cpp
189 $(CXX
) -c
$(INCLUDES
) $(DRI_CXXFLAGS
) $(DEFINES
) $< -o
$@
191 $(DRICORE_OBJ_DIR
)/%.o
: %.c
193 $(CC
) -c
$(INCLUDES
) $(DRI_CFLAGS
) $(DEFINES
) $< -o
$@
195 glsl_lexer.
cpp: glsl_lexer.ll
196 $(FLEX
) --nounistd
-o
$@
$<
198 glsl_parser.
cpp: glsl_parser.yy
199 $(BISON
) -v
-o
"$@" -p
"_mesa_glsl_" --defines
=glsl_parser.h
$<
201 glcpp
/glcpp-lex.c
: glcpp
/glcpp-lex.l
202 $(FLEX
) --nounistd
-o
$@
$<
204 glcpp
/glcpp-parse.c
: glcpp
/glcpp-parse.y
205 $(BISON
) -v
-o
"$@" --defines
=glcpp
/glcpp-parse.h
$<
207 builtin_compiler
: $(GLSL2_OBJECTS
) $(OBJECTS
) builtin_stubs.o
208 $(APP_CXX
) $(INCLUDES
) $(CXXFLAGS
) $(LDFLAGS
) $(OBJECTS
) $(GLSL2_OBJECTS
) builtin_stubs.o
-o
$@
210 builtin_function.
cpp: builtins
/profiles
/* builtins
/ir
/* builtins
/tools
/generate_builtins.py builtins
/tools
/texture_builtins.py builtin_compiler
211 @echo Regenerating builtin_function.
cpp...
212 $(PYTHON2
) $(PYTHON_FLAGS
) builtins
/tools
/generate_builtins.py .
/builtin_compiler
> builtin_function.
cpp ||
rm -f builtin_function.
cpp