summaryrefslogtreecommitdiffstats
path: root/src/angle/src/compiler/translator.pro
blob: 0051486f827978ef38db26cb58101809c5d6e1cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
TEMPLATE = lib
CONFIG += static
TARGET = $$qtLibraryTarget(translator)

include(../config.pri)

# Mingw 4.7 chokes on implicit move semantics, so disable C++11 here
mingw: CONFIG -= c++11

INCLUDEPATH += \
    $$ANGLE_DIR/src \
    $$ANGLE_DIR/include

DEFINES += _SECURE_SCL=0 _LIB COMPILER_IMPLEMENTATION

FLEX_SOURCES = $$ANGLE_DIR/src/compiler/translator/glslang.l
BISON_SOURCES = $$ANGLE_DIR/src/compiler/translator/glslang.y

HEADERS += \
    $$ANGLE_DIR/include/GLSLANG/ResourceLimits.h \
    $$ANGLE_DIR/include/GLSLANG/ShaderLang.h \
    $$ANGLE_DIR/src/compiler/translator/BaseTypes.h \
    $$ANGLE_DIR/src/compiler/translator/BuiltInFunctionEmulator.h \
    $$ANGLE_DIR/src/compiler/translator/Common.h \
    $$ANGLE_DIR/src/compiler/translator/compilerdebug.h \
    $$ANGLE_DIR/src/compiler/translator/ConstantUnion.h \
    $$ANGLE_DIR/src/compiler/translator/depgraph/DependencyGraph.h \
    $$ANGLE_DIR/src/compiler/translator/depgraph/DependencyGraphBuilder.h \
    $$ANGLE_DIR/src/compiler/translator/depgraph/DependencyGraphOutput.h \
    $$ANGLE_DIR/src/compiler/translator/DetectCallDepth.h \
    $$ANGLE_DIR/src/compiler/translator/DetectDiscontinuity.h \
    $$ANGLE_DIR/src/compiler/translator/Diagnostics.h \
    $$ANGLE_DIR/src/compiler/translator/DirectiveHandler.h \
    $$ANGLE_DIR/src/compiler/translator/ExtensionBehavior.h \
    $$ANGLE_DIR/src/compiler/translator/ForLoopUnroll.h \
    $$ANGLE_DIR/src/compiler/translator/HashNames.h \
    $$ANGLE_DIR/src/compiler/translator/InfoSink.h \
    $$ANGLE_DIR/src/compiler/translator/Initialize.h \
    $$ANGLE_DIR/src/compiler/translator/InitializeDll.h \
    $$ANGLE_DIR/src/compiler/translator/InitializeParseContext.h \
    $$ANGLE_DIR/src/compiler/translator/InitializeVariables.h \
    $$ANGLE_DIR/src/compiler/translator/intermediate.h \
    $$ANGLE_DIR/src/compiler/translator/localintermediate.h \
    $$ANGLE_DIR/src/compiler/translator/MapLongVariableNames.h \
    $$ANGLE_DIR/src/compiler/translator/MMap.h \
    $$ANGLE_DIR/src/compiler/translator/NodeSearch.h \
    $$ANGLE_DIR/src/compiler/translator/osinclude.h \
    $$ANGLE_DIR/src/compiler/translator/OutputESSL.h \
    $$ANGLE_DIR/src/compiler/translator/OutputGLSL.h \
    $$ANGLE_DIR/src/compiler/translator/OutputGLSLBase.h \
    $$ANGLE_DIR/src/compiler/translator/OutputHLSL.h \
    $$ANGLE_DIR/src/compiler/translator/ParseContext.h \
    $$ANGLE_DIR/src/compiler/translator/PoolAlloc.h \
    $$ANGLE_DIR/src/compiler/translator/Pragma.h \
    $$ANGLE_DIR/src/compiler/translator/QualifierAlive.h \
    $$ANGLE_DIR/src/compiler/translator/RemoveTree.h \
    $$ANGLE_DIR/src/compiler/translator/RenameFunction.h \
    $$ANGLE_DIR/src/compiler/translator/RewriteElseBlocks.h \
    $$ANGLE_DIR/src/compiler/translator/SearchSymbol.h \
    $$ANGLE_DIR/src/compiler/translator/ShHandle.h \
    $$ANGLE_DIR/src/compiler/translator/SymbolTable.h \
    $$ANGLE_DIR/src/compiler/translator/timing/RestrictFragmentShaderTiming.h \
    $$ANGLE_DIR/src/compiler/translator/timing/RestrictVertexShaderTiming.h \
    $$ANGLE_DIR/src/compiler/translator/TranslatorESSL.h \
    $$ANGLE_DIR/src/compiler/translator/TranslatorGLSL.h \
    $$ANGLE_DIR/src/compiler/translator/TranslatorHLSL.h \
    $$ANGLE_DIR/src/compiler/translator/Types.h \
    $$ANGLE_DIR/src/compiler/translator/UnfoldShortCircuit.h \
    $$ANGLE_DIR/src/compiler/translator/UnfoldShortCircuitAST.h \
    $$ANGLE_DIR/src/compiler/translator/Uniform.h \
    $$ANGLE_DIR/src/compiler/translator/util.h \
    $$ANGLE_DIR/src/compiler/translator/ValidateLimitations.h \
    $$ANGLE_DIR/src/compiler/translator/VariableInfo.h \
    $$ANGLE_DIR/src/compiler/translator/VariablePacker.h \
    $$ANGLE_DIR/src/compiler/translator/VersionGLSL.h \
    $$ANGLE_DIR/src/third_party/compiler/ArrayBoundsClamper.h


SOURCES += \
    $$ANGLE_DIR/src/compiler/translator/BuiltInFunctionEmulator.cpp \
    $$ANGLE_DIR/src/compiler/translator/CodeGen.cpp \
    $$ANGLE_DIR/src/compiler/translator/Compiler.cpp \
    $$ANGLE_DIR/src/compiler/translator/compilerdebug.cpp \
    $$ANGLE_DIR/src/compiler/translator/depgraph/DependencyGraph.cpp \
    $$ANGLE_DIR/src/compiler/translator/depgraph/DependencyGraphBuilder.cpp \
    $$ANGLE_DIR/src/compiler/translator/depgraph/DependencyGraphOutput.cpp \
    $$ANGLE_DIR/src/compiler/translator/depgraph/DependencyGraphTraverse.cpp \
    $$ANGLE_DIR/src/compiler/translator/DetectCallDepth.cpp \
    $$ANGLE_DIR/src/compiler/translator/DetectDiscontinuity.cpp \
    $$ANGLE_DIR/src/compiler/translator/Diagnostics.cpp \
    $$ANGLE_DIR/src/compiler/translator/DirectiveHandler.cpp \
    $$ANGLE_DIR/src/compiler/translator/ForLoopUnroll.cpp \
    $$ANGLE_DIR/src/compiler/translator/InfoSink.cpp \
    $$ANGLE_DIR/src/compiler/translator/Initialize.cpp \
    $$ANGLE_DIR/src/compiler/translator/InitializeDll.cpp \
    $$ANGLE_DIR/src/compiler/translator/InitializeParseContext.cpp \
    $$ANGLE_DIR/src/compiler/translator/InitializeVariables.cpp \
    $$ANGLE_DIR/src/compiler/translator/Intermediate.cpp \
    $$ANGLE_DIR/src/compiler/translator/intermOut.cpp \
    $$ANGLE_DIR/src/compiler/translator/IntermTraverse.cpp \
    $$ANGLE_DIR/src/compiler/translator/MapLongVariableNames.cpp \
    $$ANGLE_DIR/src/compiler/translator/OutputESSL.cpp \
    $$ANGLE_DIR/src/compiler/translator/OutputGLSL.cpp \
    $$ANGLE_DIR/src/compiler/translator/OutputGLSLBase.cpp \
    $$ANGLE_DIR/src/compiler/translator/OutputHLSL.cpp \
    $$ANGLE_DIR/src/compiler/translator/parseConst.cpp \
    $$ANGLE_DIR/src/compiler/translator/ParseContext.cpp \
    $$ANGLE_DIR/src/compiler/translator/PoolAlloc.cpp \
    $$ANGLE_DIR/src/compiler/translator/QualifierAlive.cpp \
    $$ANGLE_DIR/src/compiler/translator/RemoveTree.cpp \
    $$ANGLE_DIR/src/compiler/translator/RewriteElseBlocks.cpp \
    $$ANGLE_DIR/src/compiler/translator/SearchSymbol.cpp \
    $$ANGLE_DIR/src/compiler/translator/ShaderLang.cpp \
    $$ANGLE_DIR/src/compiler/translator/SymbolTable.cpp \
    $$ANGLE_DIR/src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp \
    $$ANGLE_DIR/src/compiler/translator/timing/RestrictVertexShaderTiming.cpp \
    $$ANGLE_DIR/src/compiler/translator/TranslatorESSL.cpp \
    $$ANGLE_DIR/src/compiler/translator/TranslatorGLSL.cpp \
    $$ANGLE_DIR/src/compiler/translator/TranslatorHLSL.cpp \
    $$ANGLE_DIR/src/compiler/translator/UnfoldShortCircuit.cpp \
    $$ANGLE_DIR/src/compiler/translator/UnfoldShortCircuitAST.cpp \
    $$ANGLE_DIR/src/compiler/translator/Uniform.cpp \
    $$ANGLE_DIR/src/compiler/translator/util.cpp \
    $$ANGLE_DIR/src/compiler/translator/ValidateLimitations.cpp \
    $$ANGLE_DIR/src/compiler/translator/VariableInfo.cpp \
    $$ANGLE_DIR/src/compiler/translator/VariablePacker.cpp \
    $$ANGLE_DIR/src/compiler/translator/VersionGLSL.cpp \
    $$ANGLE_DIR/src/third_party/compiler/ArrayBoundsClamper.cpp


winrt {
    SOURCES += $$ANGLE_DIR/src/compiler/translator/ossource_winrt.cpp
} else {
    SOURCES += $$ANGLE_DIR/src/compiler/translator/ossource_win.cpp
}

# NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin
flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME}
flex.output = ${QMAKE_FILE_BASE}_lex.cpp
flex.input = FLEX_SOURCES
flex.dependency_type = TYPE_C
flex.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += flex

bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \
                --output=${QMAKE_FILE_BASE}_tab.cpp ${QMAKE_FILE_NAME}
bison.output = ${QMAKE_FILE_BASE}_tab.h
bison.input = BISON_SOURCES
bison.dependency_type = TYPE_C
bison.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += bison

# This is a dummy compiler to work around the fact that an extra compiler can only
# have one output file even if the command generates two.
MAKEFILE_NOOP_COMMAND = @echo -n
msvc: MAKEFILE_NOOP_COMMAND = @echo >NUL
bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
bison_impl.input = BISON_SOURCES
bison_impl.commands = $$MAKEFILE_NOOP_COMMAND
bison_impl.depends = ${QMAKE_FILE_BASE}_tab.h
bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
bison_impl.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += bison_impl