-
Notifications
You must be signed in to change notification settings - Fork 1
/
jpeg.BUILD
83 lines (79 loc) · 1.61 KB
/
jpeg.BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
SOURCES = [
"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",
"jdarith.c",
"jdapimin.c",
"jdapistd.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",
"jmemmgr.c",
"jmemnobs.c",
"jquant1.c",
"jquant2.c",
"jutils.c",
]
HEADERS = [
"cderror.h",
"cdjpeg.h",
"jconfig.h",
"jdct.h",
"jerror.h",
"jinclude.h",
"jmemsys.h",
"jmorecfg.h",
"jpegint.h",
"jpeglib.h",
"jversion.h",
"transupp.h",
]
prefix_dir = "jpeg-9a"
genrule(
name = "configure",
srcs = glob(
["**/*"],
exclude = [prefix_dir + "/jconfig.h"],
),
outs = [prefix_dir + "/jconfig.h"],
cmd = "pushd external/jpeg_archive/%s; workdir=$$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $$workdir; pushd $$workdir; ./configure; popd; popd; cp $$workdir/jconfig.h $(@D); rm -rf $$workdir;" % prefix_dir,
)
cc_library(
name = "jpeg",
srcs = [prefix_dir + "/" + source for source in SOURCES],
hdrs = glob(["**/*.h"]) + [":configure"],
includes = [prefix_dir],
visibility = ["//visibility:public"],
)