blob: 8908dfe96b5d687dd643ab820ffe51490ec374be [file] [log] [blame]
Lorenz Brun0de18932021-03-11 00:36:48 +01001# Copyright 2020 The Monogon Project Authors.
2#
3# SPDX-License-Identifier: Apache-2.0
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17load("@rules_cc//cc:defs.bzl", "cc_library")
18load("@dev_source_monogon//build/utils:template_file.bzl", "template_file")
19
20template_file(
21 name = "pixman-version.h",
22 src = "pixman-version.h.in",
23 substitutions = {
24 "@PIXMAN_VERSION_MAJOR@": "0",
25 "@PIXMAN_VERSION_MINOR@": "40",
26 "@PIXMAN_VERSION_MICRO@": "1",
27 },
28)
29
30genrule(
31 name = "config-h",
32 outs = ["config.h"],
33 cmd = "echo \"\" > \"$@\"",
34)
35
36cc_library(
37 name = "pixman",
38 srcs = [
39 ":config-h",
40 "pixman.c",
41 "pixman-access.c",
42 "pixman-access-accessors.c",
43 "pixman-accessor.h",
44 "pixman-arm.c",
45 "pixman-bits-image.c",
46 "pixman-combine-float.c",
47 "pixman-combine32.c",
48 "pixman-combine32.h",
49 "pixman-compiler.h",
50 "pixman-conical-gradient.c",
51 "pixman-edge.c",
52 "pixman-edge-accessors.c",
53 "pixman-edge-imp.h",
54 "pixman-fast-path.c",
55 "pixman-filter.c",
56 "pixman-general.c",
57 "pixman-glyph.c",
58 "pixman-gradient-walker.c",
59 "pixman-image.c",
60 "pixman-implementation.c",
61 "pixman-inlines.h",
62 "pixman-linear-gradient.c",
63 "pixman-matrix.c",
64 "pixman-mips.c",
65 "pixman-noop.c",
66 "pixman-ppc.c",
67 "pixman-private.h",
68 "pixman-radial-gradient.c",
69 "pixman-region16.c",
70 "pixman-region32.c",
71 "pixman-solid-fill.c",
72 "pixman-sse2.c",
73 "pixman-ssse3.c",
74 "pixman-timer.c",
75 "pixman-trap.c",
76 "pixman-utils.c",
77 "pixman-x86.c",
78 ":pixman-version.h",
79 "dither/blue-noise-64x64.h",
80 ],
81 hdrs = [
82 "pixman.h",
83 # Please never include these, this is some next-level insanity
84 "pixman-region.c",
85 "pixman-edge.c",
86 "pixman-access.c",
87 ],
88 copts = ["-mssse3"],
89 includes = ["."],
90 local_defines = [
91 "PACKAGE=foo",
92 "HAVE_FLOAT128=1",
93 "HAVE_BUILTIN_CLZ=1",
94 "USE_SSSE3=1",
95 "USE_SSE2=1",
96 "TLS=__thread",
97 ],
98 visibility = ["//visibility:public"],
99)