Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.am 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Copyright © 2012 Jon TURNEY
  2. #
  3. # Permission is hereby granted, free of charge, to any person obtaining a
  4. # copy of this software and associated documentation files (the "Software"),
  5. # to deal in the Software without restriction, including without limitation
  6. # the rights to use, copy, modify, merge, publish, distribute, sublicense,
  7. # and/or sell copies of the Software, and to permit persons to whom the
  8. # Software is furnished to do so, subject to the following conditions:
  9. #
  10. # The above copyright notice and this permission notice (including the next
  11. # paragraph) shall be included in all copies or substantial portions of the
  12. # Software.
  13. #
  14. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. # IN THE SOFTWARE.
  21. # builtin_compiler is built before libglsl to generate builtin_function.cpp for libglsl.
  22. # For this to work, a dummy version of builtin_function.cpp, builtin_stubs.cpp, is used.
  23. AM_CFLAGS = \
  24. -I$(top_srcdir)/include \
  25. -I$(top_srcdir)/src/mapi \
  26. -I$(top_srcdir)/src/mesa/ \
  27. $(LIBRARY_INCLUDES) \
  28. $(DEFINES) \
  29. $(LIBRARY_DEFINES) \
  30. $(API_DEFINES)
  31. AM_CXXFLAGS = $(AM_CFLAGS)
  32. AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
  33. include Makefile.sources
  34. noinst_LTLIBRARIES = libglslcommon.la libglsl.la
  35. noinst_PROGRAMS = glsl_compiler glsl_test builtin_compiler
  36. # common sources for builtin_compiler and libglsl
  37. libglslcommon_la_SOURCES = \
  38. glsl_lexer.ll \
  39. glsl_parser.cc \
  40. $(LIBGLSL_FILES) \
  41. $(LIBGLSL_CXX_FILES)
  42. libglslcommon_la_LIBADD = glcpp/libglcpp.la
  43. # common sources for builtin_compiler and glsl_compiler
  44. GLSL2_SOURCES = \
  45. $(top_srcdir)/src/mesa/program/hash_table.c \
  46. $(top_srcdir)/src/mesa/program/symbol_table.c \
  47. $(GLSL_COMPILER_CXX_FILES)
  48. libglsl_la_SOURCES = \
  49. builtin_function.cpp
  50. libglsl_la_LIBADD = libglslcommon.la
  51. libglsl_la_LDFLAGS =
  52. glsl_compiler_SOURCES = \
  53. $(GLSL2_SOURCES)
  54. glsl_compiler_LDADD = libglsl.la
  55. glsl_test_SOURCES = \
  56. $(top_srcdir)/src/mesa/program/hash_table.c \
  57. $(top_srcdir)/src/mesa/program/symbol_table.c \
  58. $(GLSL_SRCDIR)/standalone_scaffolding.cpp \
  59. test.cpp \
  60. test_optpass.cpp
  61. glsl_test_LDADD = libglsl.la
  62. builtin_compiler_SOURCES = \
  63. $(GLSL2_SOURCES) \
  64. builtin_stubs.cpp
  65. builtin_compiler_LDADD = libglslcommon.la
  66. # automake <=1.11 and automake >=1.12 have different conventions for naming C++ header files
  67. # made by yacc. To work with both, we write our own rule rather than using automake's.
  68. # When (if) we require automake >=1.12 in configure.ac, this can be removed, and we can use
  69. # the automake rule.
  70. glsl_parser.cc glsl_parser.h: glsl_parser.yy
  71. $(AM_V_GEN) $(YACC) -v -o glsl_parser.cc -p "_mesa_glsl_" --defines=glsl_parser.h $<
  72. BUILT_SOURCES = glsl_parser.h builtin_function.cpp
  73. CLEANFILES = glsl_lexer.cc glsl_parser.cc $(BUILT_SOURCES)
  74. builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/glsl/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py builtin_compiler$(EXEEXT)
  75. $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
  76. glcpp/libglcpp.la:
  77. cd glcpp ; $(MAKE) $(AM_MAKEFLAGS)
  78. SUBDIRS = glcpp
  79. # Provide compatibility with scripts for the old Mesa build system for
  80. # a while by putting a link to the library in the current directory.
  81. all-local: libglsl.la
  82. ln -f .libs/libglsl.a .
  83. CLEANFILES += libglsl.a