1 # Copyright 2016 The SwiftShader Authors. All Rights Reserved.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 # Need a separate config to ensure the warnings are added to the end.
16 config("swiftshader_libGLESv2_private_config") {
21 "/DGL_GLEXT_PROTOTYPES",
22 "/DLIBGLESV2_EXPORTS",
23 "/wd4201", # nameless struct/union
24 "/wd4324", # structure was padded due to alignment specifier
29 "-D__STDC_CONSTANT_MACROS",
30 "-D__STDC_LIMIT_MACROS",
35 "-DLOG_TAG=\"swiftshader_libGLESv2\"",
36 "-D__STDC_CONSTANT_MACROS",
37 "-D__STDC_LIMIT_MACROS",
39 "-DGL_APICALL=__attribute__((visibility(\"protected\")))",
40 "-DGL_GLEXT_PROTOTYPES",
46 shared_library("swiftshader_libGLESv2") {
48 output_name = "libGLESv2"
49 output_dir = "$root_out_dir/swiftshader"
53 "../../OpenGL/compiler:swiftshader_opengl_compiler",
54 "../../Reactor:swiftshader_reactor",
55 "../../Renderer:swiftshader_renderer",
64 "IndexDataManager.cpp",
68 "ResourceManager.cpp",
71 "TransformFeedback.cpp",
73 "VertexDataManager.cpp",
84 configs -= [ "//build/config/win:unicode" ]
85 ldflags = [ "/DEF:" + rebase_path("libGLESv2.def", root_build_dir) ]
86 } else if (is_linux) {
88 [ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ]
91 configs -= [ "//build/config/compiler:chromium_code" ]
93 "//build/config/compiler:no_chromium_code",
94 "//third_party/swiftshader:swiftshader_config",
95 ":swiftshader_libGLESv2_private_config",