Alexis Hetu | 91f10e3 | 2016-06-07 19:53:42 -0400 | [diff] [blame] | 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") { |
Alexis Hetu | 03b67af | 2016-08-31 17:25:40 -0400 | [diff] [blame] | 17 | if (is_win) { |
| 18 | cflags = [ |
Alexis Hetu | d6d10f9 | 2016-11-22 13:47:04 -0500 | [diff] [blame^] | 19 | "/wd4201", # nameless struct/union |
| 20 | "/wd4324", # structure was padded due to alignment specifier |
Alexis Hetu | 03b67af | 2016-08-31 17:25:40 -0400 | [diff] [blame] | 21 | ] |
Alexis Hetu | 03b67af | 2016-08-31 17:25:40 -0400 | [diff] [blame] | 22 | } else { |
Alexis Hetu | 91f10e3 | 2016-06-07 19:53:42 -0400 | [diff] [blame] | 23 | cflags = [ |
| 24 | "-DLOG_TAG=\"swiftshader_renderer\"", |
Alexis Hetu | 91f10e3 | 2016-06-07 19:53:42 -0400 | [diff] [blame] | 25 | "-msse2", |
| 26 | "-Wno-sign-compare", |
| 27 | ] |
Alexis Hetu | 91f10e3 | 2016-06-07 19:53:42 -0400 | [diff] [blame] | 28 | } |
| 29 | } |
| 30 | |
| 31 | source_set("swiftshader_renderer") { |
Alexis Hetu | d6d10f9 | 2016-11-22 13:47:04 -0500 | [diff] [blame^] | 32 | deps = [ |
| 33 | "../Shader:swiftshader_shader", |
| 34 | ] |
Alexis Hetu | 91f10e3 | 2016-06-07 19:53:42 -0400 | [diff] [blame] | 35 | |
| 36 | sources = [ |
| 37 | "Blitter.cpp", |
| 38 | "Clipper.cpp", |
| 39 | "Color.cpp", |
| 40 | "Context.cpp", |
| 41 | "ETC_Decoder.cpp", |
| 42 | "Matrix.cpp", |
| 43 | "PixelProcessor.cpp", |
| 44 | "Plane.cpp", |
| 45 | "Point.cpp", |
| 46 | "QuadRasterizer.cpp", |
| 47 | "Renderer.cpp", |
| 48 | "Sampler.cpp", |
| 49 | "SetupProcessor.cpp", |
| 50 | "Surface.cpp", |
| 51 | "TextureStage.cpp", |
| 52 | "Vector.cpp", |
| 53 | "VertexProcessor.cpp", |
| 54 | ] |
| 55 | |
Alexis Hetu | 8be4110 | 2016-09-12 17:45:55 -0400 | [diff] [blame] | 56 | if (is_win) { |
| 57 | configs -= [ "//build/config/win:unicode" ] |
Alexis Hetu | 46c1b91 | 2016-06-23 11:06:46 -0400 | [diff] [blame] | 58 | } |
| 59 | |
Alexis Hetu | 8be4110 | 2016-09-12 17:45:55 -0400 | [diff] [blame] | 60 | configs += [ ":swiftshader_renderer_private_config" ] |
Alexis Hetu | 91f10e3 | 2016-06-07 19:53:42 -0400 | [diff] [blame] | 61 | |
| 62 | include_dirs = [ |
| 63 | ".", |
| 64 | "..", |
| 65 | "../Common", |
| 66 | "../Main", |
| 67 | "../Shader", |
| 68 | ] |
Alexis Hetu | d6d10f9 | 2016-11-22 13:47:04 -0500 | [diff] [blame^] | 69 | } |