Clone of mesa.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Makefile 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #src/glsl/pp/Makefile
  2. TOP = ../..
  3. include $(TOP)/configs/current
  4. LIBNAME = glsl
  5. C_SOURCES = \
  6. glcpp/glcpp.c \
  7. glcpp/glcpp-lex.c \
  8. glcpp/glcpp-parse.c \
  9. glcpp/pp.c \
  10. glcpp/xtalloc.c
  11. CXX_SOURCES = \
  12. ast_expr.cpp \
  13. ast_function.cpp \
  14. ast_to_hir.cpp \
  15. ast_type.cpp \
  16. builtin_function.cpp \
  17. glsl_lexer.cpp \
  18. glsl_parser.cpp \
  19. glsl_parser_extras.cpp \
  20. glsl_types.cpp \
  21. hir_field_selection.cpp \
  22. ir_basic_block.cpp \
  23. ir_clone.cpp \
  24. ir_constant_expression.cpp \
  25. ir_constant_folding.cpp \
  26. ir_constant_variable.cpp \
  27. ir_copy_propagation.cpp \
  28. ir.cpp \
  29. ir_dead_code.cpp \
  30. ir_dead_code_local.cpp \
  31. ir_expression_flattening.cpp \
  32. ir_function_can_inline.cpp \
  33. ir_function.cpp \
  34. ir_function_inlining.cpp \
  35. ir_hierarchical_visitor.cpp \
  36. ir_hv_accept.cpp \
  37. ir_if_simplification.cpp \
  38. ir_mod_to_fract.cpp \
  39. ir_print_visitor.cpp \
  40. ir_reader.cpp \
  41. ir_swizzle_swizzle.cpp \
  42. ir_validate.cpp \
  43. ir_variable.cpp \
  44. ir_vec_index_to_swizzle.cpp \
  45. linker.cpp \
  46. s_expression.cpp
  47. LIBS = \
  48. $(TOP)/src/glsl/libglsl.a \
  49. $(shell pkg-config --libs talloc)
  50. APPS = glsl_compiler
  51. GLSL2_C_SOURCES = \
  52. ../mesa/shader/hash_table.c \
  53. ../mesa/shader/symbol_table.c
  54. GLSL2_CXX_SOURCES = \
  55. main.cpp
  56. GLSL2_OBJECTS = \
  57. $(GLSL2_C_SOURCES:.c=.o) \
  58. $(GLSL2_CXX_SOURCES:.cpp=.o)
  59. ### Basic defines ###
  60. OBJECTS = \
  61. $(C_SOURCES:.c=.o) \
  62. $(CXX_SOURCES:.cpp=.o)
  63. INCLUDES = \
  64. -I. \
  65. -I../mesa \
  66. -I../mapi \
  67. -I../mesa/shader \
  68. $(LIBRARY_INCLUDES)
  69. ALL_SOURCES = \
  70. $(C_SOURCES) \
  71. $(CXX_SOURCES) \
  72. $(GLSL2_CXX_SOURCES) \
  73. $(GLSL2_C_SOURCES)
  74. ##### TARGETS #####
  75. default: depend lib$(LIBNAME).a $(APPS)
  76. lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/glsl/Makefile.template
  77. $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS)
  78. depend: $(ALL_SOURCES) Makefile
  79. rm -f depend
  80. touch depend
  81. $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2> /dev/null
  82. # Remove .o and backup files
  83. clean:
  84. rm -f $(OBJECTS) lib$(LIBNAME).a depend depend.bak
  85. -rm -f $(APPS)
  86. # Dummy target
  87. install:
  88. @echo -n ""
  89. ##### RULES #####
  90. glsl_compiler: $(GLSL2_OBJECTS) libglsl.a
  91. $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) $(LIBS) -o $@
  92. .cpp.o:
  93. $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@
  94. .c.o:
  95. $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
  96. glsl_lexer.cpp: glsl_lexer.lpp
  97. flex --never-interactive --outfile="$@" $<
  98. glsl_parser.cpp: glsl_parser.ypp
  99. bison -v -o "$@" --defines=glsl_parser.h $<
  100. glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
  101. flex --never-interactive --outfile="$@" $<
  102. glcpp/glcpp-parse.c: glcpp/glcpp-parse.y
  103. bison -v -o "$@" --defines=glcpp/glcpp-parse.h $<
  104. builtin_function.cpp: builtins/*/*
  105. ./builtins/tools/generate_builtins.pl > builtin_function.cpp
  106. -include depend