Subversion Repositories Kolibri OS

Rev

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

  1. # Copyright © 2012 Jon TURNEY
  2. # Copyright © 2012 Thierry Reding
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining a
  5. # copy of this software and associated documentation files (the "Software"),
  6. # to deal in the Software without restriction, including without limitation
  7. # the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. # and/or sell copies of the Software, and to permit persons to whom the
  9. # Software is furnished to do so, subject to the following conditions:
  10. #
  11. # The above copyright notice and this permission notice (including the next
  12. # paragraph) shall be included in all copies or substantial portions of the
  13. # Software.
  14. #
  15. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  18. # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  21. # IN THE SOFTWARE.
  22.  
  23. AM_CFLAGS = \
  24.         -I $(top_srcdir)/include \
  25.         -I $(top_srcdir)/src/mapi \
  26.         -I $(top_srcdir)/src/mesa \
  27.         -I $(GLSL_SRCDIR) \
  28.         -I $(GLSL_SRCDIR)/glcpp \
  29.         -I $(GLSL_BUILDDIR) \
  30.         $(VISIBILITY_CFLAGS)
  31.  
  32. if CROSS_COMPILING
  33. proxyCC = @CC_FOR_BUILD@
  34. proxyCFLAGS = @CFLAGS_FOR_BUILD@
  35. proxyCPP = @CPP_FOR_BUILD@
  36. proxyCPPFLAGS = @CPPFLAGS_FOR_BUILD@
  37. proxyCXX = @CXX_FOR_BUILD@
  38. proxyCXXFLAGS = @CXXFLAGS_FOR_BUILD@
  39. proxyLD = @LD_FOR_BUILD@
  40. proxyLDFLAGS = @LDFLAGS_FOR_BUILD@
  41. AM_CFLAGS += $(DEFINES_FOR_BUILD)
  42. else
  43. proxyCC = @CC@
  44. proxyCFLAGS = @CFLAGS@
  45. proxyCPP = @CPP@
  46. proxyCPPFLAGS = @CPPFLAGS@
  47. proxyCXX = @CXX@
  48. proxyCXXFLAGS = @CXXFLAGS@
  49. proxyLD = @LD@
  50. proxyLDFLAGS = @LDFLAGS@
  51. AM_CFLAGS += $(DEFINES)
  52. endif
  53.  
  54. CC = $(proxyCC)
  55. CFLAGS = $(proxyCFLAGS)
  56. CPP = $(proxyCPP)
  57. CPPFLAGS = $(proxyCPPFLAGS)
  58. CXX = $(proxyCXX)
  59. CXXFLAGS = $(proxyCXXFLAGS)
  60. LD = $(proxyLD)
  61. LDFLAGS = $(proxyLDFLAGS)
  62.  
  63. AM_CXXFLAGS = $(AM_CFLAGS)
  64.  
  65. include ../Makefile.sources
  66.  
  67. noinst_PROGRAMS = builtin_compiler
  68.  
  69. if !CROSS_COMPILING
  70. noinst_LTLIBRARIES = libglslcore.la libglcpp.la
  71.  
  72. libglcpp_la_SOURCES =                                   \
  73.         $(LIBGLCPP_GENERATED_FILES)                     \
  74.         $(LIBGLCPP_FILES)
  75.  
  76. libglslcore_la_SOURCES =                                \
  77.         $(BUILTIN_COMPILER_GENERATED_CXX_FILES)         \
  78.         $(LIBGLSL_FILES)
  79. endif
  80.  
  81. builtin_compiler_SOURCES = \
  82.         $(top_srcdir)/src/mesa/main/hash_table.c        \
  83.         $(top_srcdir)/src/mesa/main/imports.c           \
  84.         $(top_srcdir)/src/mesa/program/prog_hash_table.c\
  85.         $(top_srcdir)/src/mesa/program/symbol_table.c   \
  86.         $(BUILTIN_COMPILER_CXX_FILES)                   \
  87.         $(GLSL_COMPILER_CXX_FILES)
  88.  
  89. if CROSS_COMPILING
  90. builtin_compiler_SOURCES += \
  91.         $(LIBGLCPP_GENERATED_FILES) \
  92.         $(LIBGLCPP_FILES) \
  93.         $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
  94.         $(LIBGLSL_FILES)
  95. builtin_compiler_CPPFLAGS = $(AM_CPPFLAGS)
  96. else
  97. builtin_compiler_LDADD = libglslcore.la libglcpp.la
  98. endif
  99.