3 # Copyright © 2012 Matt Turner <mattst88@gmail.com>
5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the "Software"),
7 # to deal in the Software without restriction, including without limitation
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 # and/or sell copies of the Software, and to permit persons to whom the
10 # Software is furnished to do so, subject to the following conditions:
12 # The above copyright notice and this permission notice (including the next
13 # paragraph) shall be included in all copies or substantial portions of the
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 include Makefile.sources
28 noinst_LTLIBRARIES = libglslcore.la
29 lib_LTLIBRARIES = libglsl.la
30 check_PROGRAMS = glsl_test
31 noinst_PROGRAMS = builtin_compiler
32 bin_PROGRAMS = glsl_compiler
36 -I$(top_srcdir)/src/mesa \
37 -I$(top_srcdir)/src/mapi \
38 -I$(top_srcdir)/include
40 BUILT_SOURCES = glsl_parser.h
41 AM_YFLAGS = -d -p "_mesa_glsl_"
42 AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
44 libglslcore_la_SOURCES = \
49 libglslcore_la_LIBADD = glcpp/libglcpp.la
51 builtin_compiler_SOURCES = \
54 standalone_scaffolding.cpp \
55 ../mesa/program/symbol_table.c
56 builtin_compiler_LDADD = libglslcore.la
58 libglsl_la_SOURCES = builtin_function.cpp
59 libglsl_la_LIBADD = libglslcore.la
60 libglsl_la_LDFLAGS = -avoid-version
62 glsl_compiler_SOURCES = \
64 standalone_scaffolding.cpp \
65 ../mesa/program/symbol_table.c
66 glsl_compiler_LDADD = libglsl.la
71 standalone_scaffolding.cpp \
72 ../mesa/program/symbol_table.c
73 glsl_test_LDADD = libglsl.la
75 builtin_function.cpp: builtin_compiler
76 $(PYTHON2) $(PYTHON_FLAGS) $(top_srcdir)/src/glsl/builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
80 ln -f .libs/libglsl.so $(top_builddir)/$(LIB_DIR)/libglsl.so;