Subversion Repositories Kolibri OS

Rev

Rev 4866 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1.  
  2. SRC_DIR:=$(SDK_DIR)/sources
  3. MESA_SRC:= $(SRC_DIR)/Mesa/src
  4.  
  5. CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -Os
  6. CFLAGS_OPT+= -fomit-frame-pointer -mno-ms-bitfields
  7. CFLAGS   = -c $(CFLAGS_OPT)
  8.  
  9. INC_MESA:= -I$(SRC_DIR)/newlib/libc/include -I$(SRC_DIR)/Mesa/include
  10. INC_MESA+= -I./src -I$(MESA_SRC)/glsl -I$(MESA_SRC)/mesa -I$(MESA_SRC)/mapi
  11.  
  12. MESA_DEFS= -DMESA_DLL -DBUILD_GL32 -DMAPI_MODE_UTIL -DMAPI_TABLE_NUM_STATIC=87 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_SSE_ASM -DMAPI_TABLE_NUM_DYNAMIC=256
  13. MESA_DEFS+= -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_VERSION=\"9.2.5\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"
  14. MESA_DEFS+= -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
  15. MESA_DEFS+= -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
  16.  
  17. GLSL_SRC = \
  18.         glcpp/glcpp-lex.c               \
  19.         glcpp/glcpp-parse.c             \
  20.         glcpp/pp.c                      \
  21.         ast_array_index.cpp             \
  22.         ast_expr.cpp                    \
  23.         ast_function.cpp                \
  24.         ast_to_hir.cpp                  \
  25.         ast_type.cpp                    \
  26.         builtin_function.cpp            \
  27.         builtin_types.cpp               \
  28.         builtin_variables.cpp           \
  29.         glsl_lexer.cpp                  \
  30.         glsl_parser.cpp                 \
  31.         glsl_parser_extras.cpp          \
  32.         glsl_symbol_table.cpp           \
  33.         glsl_types.cpp                  \
  34.         hir_field_selection.cpp         \
  35.         ir.cpp                          \
  36.         ir_basic_block.cpp              \
  37.         ir_builder.cpp                  \
  38.         ir_clone.cpp                    \
  39.         ir_constant_expression.cpp      \
  40.         ir_expression_flattening.cpp    \
  41.         ir_function.cpp                 \
  42.         ir_function_can_inline.cpp      \
  43.         ir_function_detect_recursion.cpp\
  44.         ir_hierarchical_visitor.cpp     \
  45.         ir_hv_accept.cpp                \
  46.         ir_import_prototypes.cpp        \
  47.         ir_print_visitor.cpp            \
  48.         ir_reader.cpp                   \
  49.         ir_rvalue_visitor.cpp           \
  50.         ir_set_program_inouts.cpp       \
  51.         ir_validate.cpp                 \
  52.         ir_variable_refcount.cpp        \
  53.         link_functions.cpp              \
  54.         link_interface_blocks.cpp       \
  55.         link_uniform_block_active_visitor.cpp   \
  56.         link_uniform_blocks.cpp         \
  57.         link_uniform_initializers.cpp   \
  58.         link_uniforms.cpp               \
  59.         link_varyings.cpp               \
  60.         linker.cpp                      \
  61.         loop_analysis.cpp               \
  62.         loop_controls.cpp               \
  63.         loop_unroll.cpp                 \
  64.         lower_clip_distance.cpp         \
  65.         lower_discard.cpp               \
  66.         lower_discard_flow.cpp          \
  67.         lower_if_to_cond_assign.cpp     \
  68.         lower_instructions.cpp          \
  69.         lower_jumps.cpp                 \
  70.         lower_mat_op_to_vec.cpp         \
  71.         lower_named_interface_blocks.cpp\
  72.         lower_noise.cpp                 \
  73.         lower_output_reads.cpp          \
  74.         lower_packed_varyings.cpp       \
  75.         lower_packing_builtins.cpp      \
  76.         lower_texture_projection.cpp    \
  77.         lower_ubo_reference.cpp         \
  78.         lower_variable_index_to_cond_assign.cpp \
  79.         lower_vec_index_to_cond_assign.cpp      \
  80.         lower_vec_index_to_swizzle.cpp  \
  81.         lower_vector.cpp                \
  82.         lower_vector_insert.cpp         \
  83.         opt_algebraic.cpp               \
  84.         opt_array_splitting.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_builtin_varyings.cpp   \
  91.         opt_dead_code.cpp               \
  92.         opt_dead_code_local.cpp         \
  93.         opt_dead_functions.cpp          \
  94.         opt_flatten_nested_if_blocks.cpp\
  95.         opt_flip_matrices.cpp           \
  96.         opt_function_inlining.cpp       \
  97.         opt_if_simplification.cpp       \
  98.         opt_noop_swizzle.cpp            \
  99.         opt_redundant_jumps.cpp         \
  100.         opt_structure_splitting.cpp     \
  101.         opt_swizzle_swizzle.cpp         \
  102.         opt_tree_grafting.cpp           \
  103.         ralloc.c                        \
  104.         s_expression.cpp                \
  105.         strtod.c                        \
  106.         $(NULL)
  107.  
  108.  
  109. GLSL_OBJS  =  $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(GLSL_SRC)))
  110.  
  111. # targets
  112.  
  113. all: libglsl.a
  114.  
  115. libglsl.a : $(GLSL_OBJS) Makefile
  116.         $(AR) crs libglsl.a $(GLSL_OBJS)
  117.         mv -f libglsl.a $(SDK_DIR)/lib
  118.  
  119. %.o : %.c Makefile
  120.         $(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $<
  121.  
  122. %.o : %.cpp Makefile
  123.         $(CC) $(CFLAGS) $(MESA_DEFS) $(INC_MESA) -o $@ $<
  124.  
  125.