-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile.am
386 lines (351 loc) · 9.42 KB
/
Makefile.am
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
bin_PROGRAMS = advzip advpng advmng advdef
7z_SOURCES = \
7z/7zdeflate.cc \
7z/7zlzma.cc \
7z/AriBitCoder.cc \
7z/CRC.cc \
7z/DeflateDecoder.cc \
7z/DeflateEncoder.cc \
7z/HuffmanEncoder.cc \
7z/IInOutStreams.cc \
7z/InByte.cc \
7z/LSBFDecoder.cc \
7z/LSBFEncoder.cc \
7z/LZMA.cc \
7z/LZMADecoder.cc \
7z/LZMAEncoder.cc \
7z/LenCoder.cc \
7z/LiteralCoder.cc \
7z/OutByte.cc \
7z/WindowIn.cc \
7z/WindowOut.cc
libdeflate_SOURCES = \
libdeflate/arm/cpu_features.c \
libdeflate/x86/cpu_features.c \
libdeflate/adler32.c \
libdeflate/crc32.c \
libdeflate/deflate_compress.c\
libdeflate/deflate_decompress.c \
libdeflate/gzip_compress.c \
libdeflate/gzip_decompress.c \
libdeflate/utils.c \
libdeflate/zlib_compress.c \
libdeflate/zlib_decompress.c
zopfli_SOURCES = \
zopfli/blocksplitter.c \
zopfli/cache.c \
zopfli/deflate.c \
zopfli/gzip_container.c \
zopfli/hash.c \
zopfli/katajainen.c \
zopfli/lz77.c \
zopfli/squeeze.c \
zopfli/tree.c \
zopfli/util.c \
zopfli/zlib_container.c \
zopfli/zopfli.h \
zopfli/zopfli_lib.c
advzip_SOURCES = \
rezip.cc \
zip.cc \
file.cc \
data.cc \
siglock.cc \
compress.cc \
zipsh.cc \
getopt.c \
snprintf.c \
portable.c \
$(7z_SOURCES) \
$(libdeflate_SOURCES) \
$(zopfli_SOURCES)
advpng_SOURCES = \
repng.cc \
pngex.cc \
file.cc \
data.cc \
siglock.cc \
compress.cc \
getopt.c \
snprintf.c \
portable.c \
lib/fz.c \
lib/png.c \
lib/error.c \
lib/snstring.c \
$(7z_SOURCES) \
$(libdeflate_SOURCES) \
$(zopfli_SOURCES)
advmng_SOURCES = \
remng.cc \
pngex.cc \
mngex.cc \
scroll.cc \
file.cc \
data.cc \
siglock.cc \
compress.cc \
getopt.c \
snprintf.c \
portable.c \
lib/fz.c \
lib/png.c \
lib/mng.c \
lib/error.c \
lib/snstring.c \
$(7z_SOURCES) \
$(libdeflate_SOURCES) \
$(zopfli_SOURCES)
advdef_SOURCES = \
redef.cc \
file.cc \
data.cc \
siglock.cc \
compress.cc \
getopt.c \
snprintf.c \
pngex.cc \
portable.c \
lib/fz.c \
lib/error.c \
lib/snstring.c \
lib/png.c \
lib/mng.c \
$(7z_SOURCES) \
$(libdeflate_SOURCES) \
$(zopfli_SOURCES)
# Add the .version file in the distribution
dist-hook:
$(srcdir)/autover.sh > $(distdir)/.version
EXTRA_DIST = \
README AUTHORS HISTORY INSTALL COPYING \
doc/advdef.d doc/advzip.d doc/advpng.d doc/advmng.d doc/history.d doc/readme.d doc/authors.d doc/install.d \
doc/advdef.1 doc/advzip.1 doc/advpng.1 doc/advmng.1 doc/history.1 doc/readme.1 doc/authors.1 doc/install.1 \
doc/advdef.txt doc/advzip.txt doc/advpng.txt doc/advmng.txt doc/history.txt doc/readme.txt doc/authors.txt doc/install.txt \
autogen.sh autover.sh \
7z/README \
libdeflate/README.md \
libdeflate/COPYING \
libdeflate/NEWS.md \
zopfli/README \
zopfli/COPYING \
zopfli/CONTRIBUTORS \
test/test.lst \
test/archive.zip \
test/italy.png \
test/mappy.mng \
test/basn2c08.png \
test/basn3p01.png \
test/basn3p02.png \
test/basn3p04.png \
test/basn3p08.png \
test/basn6a08.png \
test/basn6a04.png
noinst_HEADERS = \
snprintf.c \
pngex.h \
mngex.h \
scroll.h \
compress.h \
file.h \
data.h \
zip.h \
except.h \
siglock.h \
portable.h \
lib/png.h \
lib/mng.h \
lib/fz.h \
lib/endianrw.h \
lib/error.h \
lib/snstring.h \
lib/extra.h \
7z/7z.h \
7z/AriBitCoder.h \
7z/AriConst.h \
7z/AriPrice.h \
7z/BinTree.h \
7z/BinTree2.h \
7z/BinTree2Main.h \
7z/BinTree3.h \
7z/BinTree3Main.h \
7z/BinTree3Z.h \
7z/BinTree3ZMain.h \
7z/BinTree4.h \
7z/BinTree4Main.h \
7z/BinTree4b.h \
7z/BinTree4bMain.h \
7z/BinTreeMF.h \
7z/BinTreeMFMain.h \
7z/BinTreeMain.h \
7z/BitTreeCoder.h \
7z/CRC.h \
7z/Const.h \
7z/DeflateDecoder.h \
7z/DeflateEncoder.h \
7z/HuffmanDecoder.h \
7z/HuffmanEncoder.h \
7z/IInOutStreams.h \
7z/InByte.h \
7z/LSBFDecoder.h \
7z/LSBFEncoder.h \
7z/LZMA.h \
7z/LZMADecoder.h \
7z/LZMAEncoder.h \
7z/LenCoder.h \
7z/LiteralCoder.h \
7z/OutByte.h \
7z/Portable.h \
7z/RCDefs.h \
7z/RangeCoder.h \
7z/WindowIn.h \
7z/WindowOut.h \
libdeflate/arm/adler32_impl.h \
libdeflate/arm/cpu_features.h \
libdeflate/arm/crc32_impl.h \
libdeflate/arm/crc32_pmull_helpers.h \
libdeflate/arm/crc32_pmull_wide.h \
libdeflate/arm/matchfinder_impl.h \
libdeflate/x86/adler32_impl.h \
libdeflate/x86/cpu_features.h \
libdeflate/x86/crc32_impl.h \
libdeflate/x86/crc32_pclmul_template.h \
libdeflate/x86/decompress_impl.h \
libdeflate/x86/matchfinder_impl.h \
libdeflate/adler32_vec_template.h \
libdeflate/bt_matchfinder.h \
libdeflate/common_defs.h \
libdeflate/cpu_features_common.h \
libdeflate/crc32_multipliers.h \
libdeflate/crc32_tables.h \
libdeflate/decompress_template.h \
libdeflate/deflate_compress.h \
libdeflate/deflate_constants.h \
libdeflate/gzip_constants.h \
libdeflate/hc_matchfinder.h \
libdeflate/ht_matchfinder.h \
libdeflate/lib_common.h \
libdeflate/libdeflate.h \
libdeflate/matchfinder_common.h \
libdeflate/zlib_constants.h \
zopfli/blocksplitter.h \
zopfli/cache.h \
zopfli/deflate.h \
zopfli/gzip_container.h \
zopfli/hash.h \
zopfli/katajainen.h \
zopfli/lz77.h \
zopfli/symbols.h \
zopfli/squeeze.h \
zopfli/tree.h \
zopfli/util.h \
zopfli/zlib_container.h \
zopfli/zopfli.h
man_MANS = doc/advdef.1 doc/advzip.1 doc/advpng.1 doc/advmng.1
clean-local:
rm -f check.lst check.zip archive.zip mappy.mng italy.png
rm -f basn2c08.png basn3p01.png basn3p02.png basn3p04.png basn3p08.png basn6a08.png basn6a04.png
rm -f advdef.exe advzip.exe advpng.exe advmng.exe
rm -f mappy*.png
maintainer-clean-local:
rm -f README AUTHORS HISTORY INSTALL doc/copying.txt
rm -f doc/*.hh
# Rules for documentation
if HAVE_ADVD2
%.1 : %.d
advd2 man < $(srcdir)/$< > $@
%.txt : %.d
advd2 txt < $(srcdir)/$< | todos > $@
%.html : %.d
advd2 html < $(srcdir)/$< > $@
%.hh : %.d
advd2 frame < $(srcdir)/$< > $@
endif
# Archives
DTOU = tr -d '\015'
README: doc/readme.txt
cat $< | $(DTOU) > $@
AUTHORS: doc/authors.txt
cat $< | $(DTOU) > $@
INSTALL: doc/install.txt
cat $< | $(DTOU) > $@
HISTORY: doc/history.txt
cat $< | $(DTOU) > $@
doc/copying.txt: COPYING
cat $< | todos > $@
# We don't test wth -L the with -3 and -4 because the result is depending on
# the compiler and/or optimization options.
# This is likely a defect of 7z/zopfli implementation.
# For zopfli a possible cause is the use of qsort() (not stable sorting),
# that may be different on different platforms.
check-local: ./advzip$(EXEEXT) test/test.lst
@cp $(srcdir)/test/archive.zip .
@echo CRC SIZE > check.lst
$(TESTENV) ./advzip$(EXEEXT) -z archive.zip
$(TESTENV) ./advzip$(EXEEXT) -L archive.zip >> check.lst
$(TESTENV) ./advzip$(EXEEXT) -t -p archive.zip
$(TESTENV) ./advzip$(EXEEXT) -z -3 archive.zip
$(TESTENV) ./advzip$(EXEEXT) -t -p archive.zip
$(TESTENV) ./advzip$(EXEEXT) -z -4 archive.zip
$(TESTENV) ./advzip$(EXEEXT) -t -p archive.zip
$(TESTENV) ./advzip$(EXEEXT) -a check.zip $(srcdir)/COPYING
$(TESTENV) ./advzip$(EXEEXT) -t -p check.zip
$(TESTENV) ./advzip$(EXEEXT) -L check.zip >> check.lst
$(TESTENV) ./advzip$(EXEEXT) -a -N check.zip $(srcdir)/COPYING
$(TESTENV) ./advzip$(EXEEXT) -t -p check.zip
$(TESTENV) ./advzip$(EXEEXT) -L check.zip >> check.lst
$(TESTENV) ./advzip$(EXEEXT) -z -3 check.zip
$(TESTENV) ./advzip$(EXEEXT) -t -p check.zip
$(TESTENV) ./advzip$(EXEEXT) -z -4 check.zip
$(TESTENV) ./advzip$(EXEEXT) -t -p check.zip
@cp $(srcdir)/test/mappy.mng .
$(TESTENV) ./advmng$(EXEEXT) -v -z -f -S 8 mappy.mng
$(TESTENV) ./advmng$(EXEEXT) -L mappy.mng >> check.lst
$(TESTENV) ./advmng$(EXEEXT) -v -x mappy.mng
$(TESTENV) ./advmng$(EXEEXT) -v -a 30 -S 8 mappy.mng mappy-*.png
$(TESTENV) ./advmng$(EXEEXT) -L mappy.mng >> check.lst
$(TESTENV) ./advmng$(EXEEXT) -v -a 30 -n -S 8 mappy.mng mappy-*.png
$(TESTENV) ./advmng$(EXEEXT) -L mappy.mng >> check.lst
$(TESTENV) ./advmng$(EXEEXT) -v -a 30 -n -r -S 8 mappy.mng mappy-*.png
$(TESTENV) ./advmng$(EXEEXT) -L mappy.mng >> check.lst
@cp $(srcdir)/test/italy.png .
$(TESTENV) ./advpng$(EXEEXT) -z italy.png
$(TESTENV) ./advpng$(EXEEXT) -L italy.png >> check.lst
@cp $(srcdir)/test/basn2c08.png $(srcdir)/test/basn3p01.png $(srcdir)/test/basn3p02.png $(srcdir)/test/basn3p04.png $(srcdir)/test/basn3p08.png $(srcdir)/test/basn6a08.png $(srcdir)/test/basn6a04.png .
$(TESTENV) ./advpng$(EXEEXT) -f -z basn2c08.png basn3p01.png basn3p02.png basn3p04.png basn3p08.png basn6a08.png basn6a04.png
$(TESTENV) ./advpng$(EXEEXT) -L basn2c08.png basn3p01.png basn3p02.png basn3p04.png basn3p08.png basn6a08.png basn6a04.png >> check.lst
cat check.lst | $(DTOU) | cmp $(srcdir)/test/test.lst
@echo Success!
DISTDOS_ROOT = \
doc/readme.txt doc/authors.txt doc/history.txt doc/copying.txt \
advdef.exe advzip.exe advpng.exe advmng.exe
DISTDOS_DOC = \
doc/advdef.txt doc/advzip.txt doc/advpng.txt doc/advmng.txt \
doc/readme.txt doc/authors.txt doc/history.txt
distdos: $(DISTDOS_ROOT) $(DISTDOS_DOC)
rm -f $(PACKAGE)-$(VERSION)-dos-x86.zip
mkdir tmp
cp $(DISTDOS_ROOT) tmp
mkdir tmp/doc
cp $(DISTDOS_DOC) tmp/doc
cd tmp && zip -r ../$(PACKAGE)-$(VERSION)-dos-x86.zip *
rm -r tmp
distwindows-x86: $(DISTDOS_ROOT) $(DISTDOS_DOC)
rm -f $(PACKAGE)-$(VERSION)-windows-x86.zip
mkdir tmp
cp $(DISTDOS_ROOT) tmp
mkdir tmp/doc
cp $(DISTDOS_DOC) tmp/doc
cd tmp && zip -r ../$(PACKAGE)-$(VERSION)-windows-x86.zip *
rm -r tmp
distwindows-x64: $(DISTDOS_ROOT) $(DISTDOS_DOC)
rm -f $(PACKAGE)-$(VERSION)-windows-x64.zip
mkdir tmp
cp $(DISTDOS_ROOT) tmp
mkdir tmp/doc
cp $(DISTDOS_DOC) tmp/doc
cd tmp && zip -r ../$(PACKAGE)-$(VERSION)-windows-x64.zip *
rm -r tmp
DISTWEB = \
doc/advdef.hh doc/advzip.hh doc/advpng.hh doc/advmng.hh doc/history.hh
web: $(DISTWEB)