OSDN Git Service

ee5213dff1cc5efd0a6a71a8434b69a5524434a2
[android-x86/external-swiftshader.git] / src / Renderer / BUILD.gn
1 # Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # Need a separate config to ensure the warnings are added to the end.
16 config("swiftshader_renderer_private_config") {
17   if (is_clang) {
18     cflags = [
19       "-DLOG_TAG=\"swiftshader_renderer\"",
20       "-fno-operator-names",
21       "-msse2",
22       "-Wno-sign-compare",
23     ]
24
25     if (!is_debug) {
26       cflags += [
27         "-DNDEBUG",
28         "-DANGLE_DISABLE_TRACE",
29       ]
30     }
31   }
32 }
33
34 source_set("swiftshader_renderer") {
35   deps = [
36     "../Common:swiftshader_common",
37     "../Shader:swiftshader_shader",
38     "../Main:swiftshader_main",
39   ]
40
41   sources = [
42     "Blitter.cpp",
43     "Clipper.cpp",
44     "Color.cpp",
45     "Context.cpp",
46     "ETC_Decoder.cpp",
47     "Matrix.cpp",
48     "PixelProcessor.cpp",
49     "Plane.cpp",
50     "Point.cpp",
51     "QuadRasterizer.cpp",
52     "Renderer.cpp",
53     "Sampler.cpp",
54     "SetupProcessor.cpp",
55     "Surface.cpp",
56     "TextureStage.cpp",
57     "Vector.cpp",
58     "VertexProcessor.cpp",
59   ]
60
61   configs += [
62     ":swiftshader_renderer_private_config",
63   ]
64
65   include_dirs = [
66     ".",
67     "..",
68     "../Common",
69     "../Main",
70     "../Shader",
71   ]
72 }