| licenses(["notice"]) |
| |
| cc_library( |
| name = "libjpeg", |
| srcs = glob([ |
| "jaricom.c", |
| "jcapimin.c", |
| "jcapistd.c", |
| "jcarith.c", |
| "jccoefct.c", |
| "jccolor.c", |
| "jcdctmgr.c", |
| "jchuff.c", |
| "jcinit.c", |
| "jcmainct.c", |
| "jcmarker.c", |
| "jcmaster.c", |
| "jcomapi.c", |
| "jcparam.c", |
| "jcprepct.c", |
| "jcsample.c", |
| "jctrans.c", |
| "jdapimin.c", |
| "jdapistd.c", |
| "jdarith.c", |
| "jdatadst.c", |
| "jdatasrc.c", |
| "jdcoefct.c", |
| "jdcolor.c", |
| "jddctmgr.c", |
| "jdhuff.c", |
| "jdinput.c", |
| "jdmainct.c", |
| "jdmarker.c", |
| "jdmaster.c", |
| "jdmerge.c", |
| "jdpostct.c", |
| "jdsample.c", |
| "jdtrans.c", |
| "jerror.c", |
| "jfdctflt.c", |
| "jfdctfst.c", |
| "jfdctint.c", |
| "jidctflt.c", |
| "jidctfst.c", |
| "jidctint.c", |
| "jquant1.c", |
| "jquant2.c", |
| "jutils.c", |
| "jmemmgr.c", |
| "jmemnobs.c", |
| ]), |
| hdrs = glob( |
| [ |
| "*.h", |
| ], |
| exclude = [ |
| "jmemdos.h", |
| "jmemmac.h", |
| ], |
| ), |
| copts = [ |
| "-Wno-cast-align", |
| "-Wno-cast-qual", |
| "-Wno-switch-enum", |
| "-Wno-format-nonliteral", |
| "-Wno-unused-parameter", |
| "-Wno-implicit-fallthrough", |
| ] + select({ |
| "//tools:cpu_roborio": [ |
| # This is sketchy under the standard, but it's a known issue with |
| # libjpeg which isn't particularly well defined by the JPEG standard |
| # either. We should be fine because all our platforms are two's |
| # complement. |
| "-Wno-shift-negative-value", |
| ], |
| "//conditions:default": [], |
| }), |
| includes = ["src/main/c"], |
| visibility = ["//visibility:public"], |
| ) |