blob: 0b34cb7390f292476306d641c6caf52e93d0d65d [file] [log] [blame]
Brian Silverman7a7c24d2018-09-01 17:49:09 -07001licenses(["notice"])
Brian Silverman2c0b1702016-03-13 14:23:23 -04002
3cc_library(
Brian Silverman7a7c24d2018-09-01 17:49:09 -07004 name = "libjpeg",
5 srcs = glob([
6 "jaricom.c",
7 "jcapimin.c",
8 "jcapistd.c",
9 "jcarith.c",
10 "jccoefct.c",
11 "jccolor.c",
12 "jcdctmgr.c",
13 "jchuff.c",
14 "jcinit.c",
15 "jcmainct.c",
16 "jcmarker.c",
17 "jcmaster.c",
18 "jcomapi.c",
19 "jcparam.c",
20 "jcprepct.c",
21 "jcsample.c",
22 "jctrans.c",
23 "jdapimin.c",
24 "jdapistd.c",
25 "jdarith.c",
26 "jdatadst.c",
27 "jdatasrc.c",
28 "jdcoefct.c",
29 "jdcolor.c",
30 "jddctmgr.c",
31 "jdhuff.c",
32 "jdinput.c",
33 "jdmainct.c",
34 "jdmarker.c",
35 "jdmaster.c",
36 "jdmerge.c",
37 "jdpostct.c",
38 "jdsample.c",
39 "jdtrans.c",
40 "jerror.c",
41 "jfdctflt.c",
42 "jfdctfst.c",
43 "jfdctint.c",
44 "jidctflt.c",
45 "jidctfst.c",
46 "jidctint.c",
47 "jquant1.c",
48 "jquant2.c",
49 "jutils.c",
50 "jmemmgr.c",
51 "jmemnobs.c",
52 ]),
53 hdrs = glob(
54 [
55 "*.h",
56 ],
57 exclude = [
58 "jmemdos.h",
59 "jmemmac.h",
60 ],
61 ),
Brian Silverman7a7c24d2018-09-01 17:49:09 -070062 copts = [
63 "-Wno-cast-align",
64 "-Wno-cast-qual",
65 "-Wno-switch-enum",
66 "-Wno-format-nonliteral",
67 "-Wno-unused-parameter",
James Kuszmaul3ae42262019-11-08 12:33:41 -080068 "-Wno-implicit-fallthrough",
Austin Schuhf6b94632019-02-02 22:11:27 -080069 ] + select({
70 "//tools:cpu_roborio": [
71 # This is sketchy under the standard, but it's a known issue with
72 # libjpeg which isn't particularly well defined by the JPEG standard
73 # either. We should be fine because all our platforms are two's
74 # complement.
75 "-Wno-shift-negative-value",
76 ],
77 "//conditions:default": [],
78 }),
Brian Silverman7a7c24d2018-09-01 17:49:09 -070079 includes = ["src/main/c"],
Philipp Schraderdada1072020-11-24 11:34:46 -080080 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070081 visibility = ["//visibility:public"],
Brian Silverman2c0b1702016-03-13 14:23:23 -040082)