955556b64a37f89afbe2adc9c316bfe1c0e0d2ac
[mesa.git] / src / glsl / Makefile.am
1
2
3 # Copyright © 2012 Matt Turner <mattst88@gmail.com>
4 #
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:
11 #
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
14 # Software.
15 #
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
22 # IN THE SOFTWARE.
23
24 include Makefile.sources
25
26 SUBDIRS = glcpp
27
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
33
34 AM_CPPFLAGS = \
35 $(DEFINES) \
36 -I$(top_srcdir)/src/mesa \
37 -I$(top_srcdir)/src/mapi \
38 -I$(top_srcdir)/include
39
40 BUILT_SOURCES = glsl_parser.h
41 AM_YFLAGS = -d -p "_mesa_glsl_"
42 AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
43
44 libglslcore_la_SOURCES = \
45 strtod.c \
46 glsl_lexer.ll \
47 glsl_parser.yy \
48 $(LIBGLSL_CXX_FILES)
49 libglslcore_la_LIBADD = glcpp/libglcpp.la
50
51 builtin_compiler_SOURCES = \
52 builtin_stubs.cpp \
53 main.cpp \
54 standalone_scaffolding.cpp \
55 ../mesa/program/symbol_table.c
56 builtin_compiler_LDADD = libglslcore.la
57
58 libglsl_la_SOURCES = builtin_function.cpp
59 libglsl_la_LIBADD = libglslcore.la
60 libglsl_la_LDFLAGS = -avoid-version
61
62 glsl_compiler_SOURCES = \
63 main.cpp \
64 standalone_scaffolding.cpp \
65 ../mesa/program/symbol_table.c
66 glsl_compiler_LDADD = libglsl.la
67
68 glsl_test_SOURCES = \
69 test.cpp \
70 test_optpass.cpp \
71 standalone_scaffolding.cpp \
72 ../mesa/program/symbol_table.c
73 glsl_test_LDADD = libglsl.la
74
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
77
78 if BUILD_SHARED
79 all-local: libglsl.la
80 ln -f .libs/libglsl.so $(top_builddir)/$(LIB_DIR)/libglsl.so;
81 endif