pvq: use small LUT for integer sqrt((n+3)/2) sqrt((n+2)/2)
[daala.git] / Makefile.am
1 # Libraries
2
3 # Provide the full test output for failed tests when using the parallel
4 # test suite (which is enabled by default with automake 1.13+).
5 export VERBOSE = yes
6
7 lib_LTLIBRARIES = src/libdaalabase.la src/libdaaladec.la src/libdaalaenc.la
8
9 AM_CPPFLAGS = -I$(srcdir)/include
10
11 noinst_HEADERS = \
12         src/block_size.h \
13         src/block_size_enc.h \
14         src/dct.h \
15         src/decint.h \
16         src/dering.h \
17         src/encint.h \
18         src/entcode.h \
19         src/entdec.h \
20         src/entenc.h \
21         src/filter.h \
22         src/generic_code.h \
23         src/internal.h \
24         src/intra.h \
25         src/logging.h \
26         src/mc.h \
27         src/mcenc.h \
28         src/odintrin.h \
29         src/partition.h \
30         src/pvq.h \
31         src/pvq_decoder.h \
32         src/pvq_encoder.h \
33         src/quantizer.h \
34         src/state.h \
35         src/tf.h \
36         src/util.h \
37         src/zigzag.h \
38         src/accounting.h \
39         src/x86/cpu.h \
40         src/x86/x86enc.h \
41         src/x86/x86dct.h \
42         src/x86/x86int.h \
43         src/arm/cpu.h \
44         src/arm/armint.h
45
46 src_dct_SOURCES = src/dct.c src/internal.c
47 if ENABLE_X86ASM
48 src_dct_SOURCES += src/x86/cpu.c
49 if ENABLE_SSE2_INTRINSICS
50 src_dct_SOURCES += src/x86/sse2dct.c
51 %sse2dct.o %sse2dct.lo: CFLAGS += -msse2
52 endif
53 if ENABLE_SSE41_INTRINSICS
54 src_dct_SOURCES += src/x86/sse41dct.c
55 %sse41dct.o %sse41dct.lo: CFLAGS += -msse4.1
56 endif
57 if ENABLE_AVX2_INTRINSICS
58 src_dct_SOURCES += src/x86/avx2dct.c
59 %avx2dct.o %avx2dct.lo: CFLAGS += -mavx2
60 endif
61 endif
62 if ENABLE_ARMASM
63 src_dct_SOURCES += src/arm/cpu.c
64 endif
65
66
67 src_libdaalabase_la_LIBADD = $(LIBM)
68 if DUMP_IMAGES
69   src_libdaalabase_la_LIBADD += $(PNG_LIBS)
70 endif
71 src_libdaalabase_la_LDFLAGS = -no-undefined \
72  -version-info @OD_LT_CURRENT@:@OD_LT_REVISION@:@OD_LT_AGE@
73 src_libdaalabase_la_LDFLAGS +=
74 src_libdaalabase_la_SOURCES = \
75         src/accounting.c \
76         src/entcode.c \
77         src/entdec.c \
78         src/dering.c \
79         src/filter.c \
80         src/generic_code.c \
81         src/generic_decoder.c \
82         src/info.c \
83         src/intra.c \
84         src/laplace_decoder.c \
85         src/laplace_tables.c \
86         src/logging.c \
87         src/mc.c \
88         src/partition.c \
89         src/pvq.c \
90         src/pvq_decoder.c \
91         src/quantizer.c \
92         src/state.c \
93         src/switch_table.c \
94         src/tf.c \
95         src/util.c \
96         src/zigzag4.c \
97         src/zigzag8.c \
98         src/zigzag16.c \
99         src/zigzag32.c \
100         src/zigzag64.c \
101         $(src_dct_SOURCES)
102 if ENABLE_X86ASM
103 src_libdaalabase_la_SOURCES += \
104         src/x86/sse2dering.c \
105         src/x86/sse2mc.c \
106         src/x86/sse2util.c \
107         src/x86/x86state.c
108 endif
109
110 src_libdaaladec_la_LIBADD = src/libdaalabase.la $(LIBM)
111 src_libdaaladec_la_LDFLAGS = -no-undefined \
112  -version-info @OD_LT_CURRENT@:@OD_LT_REVISION@:@OD_LT_AGE@
113 src_libdaaladec_la_SOURCES = \
114         src/decode.c \
115         src/infodec.c
116
117 src_libdaalaenc_la_LIBADD = src/libdaalabase.la $(LIBM)
118 if ENCODER_CHECK
119   src_libdaalaenc_la_LIBADD += src/libdaaladec.la
120 endif
121 src_libdaalaenc_la_LDFLAGS = -no-undefined \
122  -version-info @OD_LT_CURRENT@:@OD_LT_REVISION@:@OD_LT_AGE@
123 src_libdaalaenc_la_SOURCES = \
124         src/block_size_enc.c \
125         src/encode.c \
126         src/entenc.c \
127         src/generic_encoder.c \
128         src/infoenc.c \
129         src/laplace_encoder.c \
130         src/mcenc.c \
131         src/pvq_encoder.c \
132         src/rate.c
133 if ENABLE_X86ASM
134 src_libdaalaenc_la_SOURCES += \
135         src/x86/x86enc.c \
136         src/x86/x86mcenc.c
137 if ENABLE_SSE2_INTRINSICS
138 src_libdaalaenc_la_SOURCES += \
139         src/x86/sse2mcenc.c
140 %sse2mcenc.o %sse2mcenc.lo: CFLAGS += -msse2
141 endif
142 endif
143
144 # Example programs
145
146 noinst_PROGRAMS =
147
148 if ENABLE_EXAMPLES
149   noinst_PROGRAMS += \
150         examples/dump_video \
151         examples/encoder_example
152 endif
153
154
155 if ENABLE_PLAYER_EXAMPLE
156   noinst_PROGRAMS += examples/player_example
157 endif
158
159 if ENABLE_ANALYZER
160   noinst_PROGRAMS += examples/analyzer
161 endif
162
163 examples_dump_video_SOURCES = examples/dump_video.c
164 examples_dump_video_CFLAGS = $(OGG_CFLAGS)
165 examples_dump_video_LDADD = src/libdaalabase.la src/libdaaladec.la  $(OGG_LIBS)
166
167 examples_encoder_example_SOURCES = examples/encoder_example.c
168 examples_encoder_example_CFLAGS = $(OGG_CFLAGS)
169 examples_encoder_example_LDADD = src/libdaalabase.la src/libdaalaenc.la $(OGG_LIBS) $(LIBM)
170
171 if ENABLE_PLAYER_EXAMPLE
172 examples_player_example_SOURCES = examples/player_example.c
173 examples_player_example_CFLAGS = $(OGG_CFLAGS) $(SDL_CFLAGS)
174 examples_player_example_LDADD = src/libdaalabase.la src/libdaaladec.la $(OGG_LIBS) $(SDL_LIBS)
175 endif
176
177 if ENABLE_ANALYZER
178 examples_analyzer_SOURCES = examples/analyzer.cc
179 examples_analyzer_CXXFLAGS = $(OGG_CFLAGS) $(WX_CPPFLAGS)
180 examples_analyzer_LDADD = src/libdaalabase.la src/libdaaladec.la $(OGG_LIBS) $(WX_LIBS)
181 endif
182
183 # Includes
184
185 daalaincludedir = $(includedir)/daala
186 daalainclude_HEADERS = \
187         include/daala/codec.h \
188         include/daala/daaladec.h \
189         include/daala/daalaenc.h \
190         include/daala/daala_integer.h
191
192 # Tools
193
194 CLEANFILES =
195 EXTRA_PROGRAMS =
196
197 if ENABLE_TOOLS
198
199 tools_TARGETS = \
200         tools/png2y4m \
201         tools/y4m2png \
202         tools/dump_psnrhvs \
203         tools/block_size_analysis \
204         tools/to_monochrome \
205         tools/downsample \
206         tools/upsample \
207         tools/divu_const \
208         tools/trans \
209         tools/trans2d \
210         tools/trans_gain \
211         tools/gen_cdf \
212         tools/gen_sqrt_tbl \
213         tools/compute_basis \
214         tools/compute_haar_basis \
215         tools/cos_search \
216         tools/gen_laplace_tables \
217         tools/daalainfo \
218         tools/dump_ssim \
219         tools/dump_fastssim \
220         tools/bjontegaard \
221         tools/yuvjpeg \
222         tools/jpegyuv \
223         tools/yuv2yuv4mpeg \
224         tools/dump_psnr \
225         tools/vq_train \
226         tools/draw_zigzags \
227         tools/dump_msssim
228
229 noinst_HEADERS += \
230         tools/cholesky.h \
231         tools/int_search.h \
232         tools/kiss99.h \
233         tools/matidx.h \
234         tools/od_defs.h \
235         tools/od_filter.h \
236         tools/pythag.h \
237         tools/svd.h \
238         tools/trans_tools.h \
239         tools/vidinput.h
240
241 EXTRA_PROGRAMS += $(tools_TARGETS)
242 CLEANFILES += $(tools_TARGETS)
243
244 tools_daalainfo_SOURCES = tools/daalainfo.c
245 tools_daalainfo_CFLAGS = $(OGG_CFLAGS)
246 tools_daalainfo_LDADD = $(OGG_LIBS) src/libdaalabase.la src/libdaaladec.la
247
248 # png2y4m
249 tools_png2y4m_SOURCES = \
250         tools/kiss99.c \
251         tools/png2y4m.c
252 tools_png2y4m_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS)
253 tools_png2y4m_LDADD = $(OGG_LIBS) $(PNG_LIBS)
254
255 # y4m2png
256 tools_y4m2png_SOURCES = \
257         tools/vidinput.c \
258         tools/y4m_input.c \
259         tools/y4m2png.c
260 tools_y4m2png_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS)
261 tools_y4m2png_LDADD = $(OGG_LIBS) $(PNG_LIBS)
262
263 # dump_psnrhvs
264 tools_dump_psnrhvs_SOURCES = \
265         tools/vidinput.c \
266         tools/y4m_input.c \
267         $(src_dct_SOURCES) \
268         tools/dump_psnrhvs.c
269 tools_dump_psnrhvs_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS)
270 tools_dump_psnrhvs_LDADD = $(OGG_LIBS) $(LIBM)
271
272 # dump_ssim
273 tools_dump_ssim_SOURCES = \
274         tools/vidinput.c \
275         tools/y4m_input.c \
276         tools/dump_ssim.c
277 tools_dump_ssim_CFLAGS = $(OGG_CFLAGS)
278 tools_dump_ssim_LDADD = $(OGG_LIBS) $(LIBM)
279
280 # dump_msssim
281 tools_dump_msssim_SOURCES = \
282         tools/vidinput.c \
283         tools/y4m_input.c \
284         tools/dump_msssim.c
285 tools_dump_msssim_CFLAGS = $(OGG_CFLAGS)
286 tools_dump_msssim_LDADD = $(OGG_LIBS) $(LIBM)
287
288 # dump_fastssim
289 tools_dump_fastssim_SOURCES = \
290         tools/vidinput.c \
291         tools/y4m_input.c \
292         tools/dump_fastssim.c
293 tools_dump_fastssim_CFLAGS = $(OGG_CFLAGS)
294 tools_dump_fastssim_LDADD = $(OGG_LIBS) $(LIBM)
295
296 # dump_psnr
297 tools_dump_psnr_SOURCES = \
298         tools/vidinput.c \
299         tools/y4m_input.c \
300         tools/dump_psnr.c
301 tools_dump_psnr_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS)
302 tools_dump_psnr_LDADD = $(OGG_LIBS) $(LIBM)
303
304 # block_size_analysis
305 tools_block_size_analysis_SOURCES = \
306         tools/block_size_analysis.c \
307         src/block_size_enc.c \
308         tools/vidinput.c \
309         tools/y4m_input.c \
310         $(src_dct_SOURCES) \
311         src/logging.c \
312         src/entcode.c \
313         src/entenc.c \
314         src/filter.c \
315         src/switch_table.c
316 tools_block_size_analysis_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS)
317 tools_block_size_analysis_LDADD = $(OGG_LIBS) $(PNG_LIBS) $(LIBM)
318
319 # to_monochrome
320 tools_to_monochrome_SOURCES = \
321         tools/vidinput.c \
322         tools/y4m_input.c \
323         tools/to_monochrome.c
324 tools_to_monochrome_CFLAGS = $(THEORA_CFLAGS) $(OGG_CFLAGS) $(PNG_CFLAGS)
325 tools_to_monochrome_LDADD = $(THEORA_LIBS) $(OGG_LIBS) $(PNG_LIBS)
326
327 # downsample
328 tools_downsample_SOURCES = \
329         tools/vidinput.c \
330         tools/y4m_input.c \
331         tools/downsample.c
332 tools_downsample_CFLAGS = $(THEORA_CFLAGS) $(OGG_CFLAGS) $(PNG_CFLAGS)
333 tools_downsample_LDADD = $(THEORA_LIBS) $(OGG_LIBS) $(PNG_LIBS)
334
335 # upsample
336 tools_upsample_SOURCES = \
337         $(src_dct_SOURCES) \
338         src/dering.c \
339         src/filter.c \
340         src/generic_code.c \
341         src/switch_table.c \
342         src/logging.c \
343         src/info.c \
344         src/mc.c \
345         src/partition.c \
346         src/pvq.c \
347         src/state.c \
348         src/util.c \
349         src/zigzag4.c \
350         src/zigzag8.c \
351         src/zigzag16.c \
352         src/zigzag32.c \
353         src/zigzag64.c \
354         tools/vidinput.c \
355         tools/y4m_input.c \
356         tools/upsample.c
357 if ENABLE_X86ASM
358 tools_upsample_SOURCES += \
359         src/x86/sse2dering.c \
360         src/x86/sse2mc.c \
361         src/x86/sse2util.c \
362         src/x86/x86state.c
363 endif
364 tools_upsample_CFLAGS = $(THEORA_CFLAGS) $(OGG_CFLAGS) $(PNG_CFLAGS)
365 tools_upsample_LDADD = $(THEORA_LIBS) $(OGG_LIBS) $(PNG_LIBS) $(LIBM)
366
367 # divu_const
368 tools_divu_const_SOURCES = \
369         tools/divu_const.c
370 tools_divu_const_CFLAGS = $(OGG_CFLAGS)
371 tools_divu_const_LDADD = $(OGG_LIBS) $(LIBM)
372
373 # trans
374 tools_trans_SOURCES = \
375         tools/trans.c \
376         tools/vidinput.c \
377         tools/y4m_input.c \
378         tools/od_filter.c \
379         tools/trans_tools.c \
380         tools/int_search.c \
381         tools/trans_data.c \
382         tools/kiss99.c \
383         tools/svd.c \
384         tools/cholesky.c \
385         src/filter.c \
386         $(src_dct_SOURCES)
387 tools_trans_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS) $(OPENMP_CFLAGS)
388 tools_trans_LDADD = $(OGG_LIBS) $(PNG_LIBS) $(LIBM)
389
390 # trans_gain
391 tools_trans_gain_SOURCES = \
392         tools/trans_gain.c \
393         tools/vidinput.c \
394         tools/y4m_input.c \
395         tools/od_filter.c \
396         tools/trans_tools.c \
397         src/filter.c \
398         $(src_dct_SOURCES)
399 tools_trans_gain_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS) $(OPENMP_CFLAGS)
400 tools_trans_gain_LDADD = $(OGG_LIBS) $(PNG_LIBS) $(LIBM)
401
402 #trans2d
403 tools_trans2d_SOURCES = \
404         tools/trans2d.c \
405         tools/vidinput.c \
406         tools/y4m_input.c \
407         tools/od_filter.c \
408         tools/trans_tools.c \
409         tools/int_search.c \
410         tools/trans_data.c \
411         tools/kiss99.c \
412         tools/svd.c \
413         tools/cholesky.c \
414         src/filter.c \
415         $(src_dct_SOURCES)
416 tools_trans2d_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS) $(OPENMP_CFLAGS)
417 tools_trans2d_LDADD = $(OGG_LIBS) $(PNG_LIBS) $(LIBM)
418
419 # gen_cdf
420 tools_gen_cdf_SOURCES = \
421         tools/gen_cdf.c
422 tools_gen_cdf_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS)
423 tools_gen_cdf_LDADD = $(OGG_LIBS) $(PNG_LIBS) $(LIBM)
424
425 # gen_sqrt_tbl
426 tools_gen_sqrt_tbl_SOURCES = \
427         tools/gen_sqrt_tbl.c
428 tools_gen_sqrt_tbl_LDADD = $(LIBM)
429
430 # compute_basis
431 tools_compute_basis_SOURCES = \
432         tools/compute_basis.c \
433         src/dct.c \
434         src/filter.c \
435         src/internal.c
436 tools_compute_basis_CFLAGS = $(OGG_CFLAGS)
437 tools_compute_basis_LDADD = $(OGG_LIBS) $(LIBM)
438
439 # compute_haar_basis
440 tools_compute_haar_basis_SOURCES = \
441         tools/compute_haar_basis.c \
442         src/dct.c \
443         src/filter.c \
444         src/internal.c
445 tools_compute_haar_basis_CFLAGS = $(OGG_CFLAGS)
446 tools_compute_haar_basis_LDADD = $(OGG_LIBS) $(LIBM)
447
448 # cos_search
449 tools_cos_search_SOURCES = \
450         tools/cos_search.c
451 tools_cos_search_LDADD = $(LIBM)
452
453 # gen_laplace_tables
454 tools_gen_laplace_tables_SOURCES = \
455         tools/gen_laplace_tables.c
456 tools_gen_laplace_tables_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS)
457 tools_gen_laplace_tables_LDADD = $(OGG_LIBS) $(PNG_LIBS) $(LIBM)
458
459 # bjontegaard
460 tools_bjontegaard_SOURCES = \
461         tools/bjontegaard.c \
462         tools/cholesky.c \
463         tools/qr.c \
464         tools/svd.c
465 tools_bjontegaard_CFLAGS =
466 tools_bjontegaard_LDADD = $(LIBM)
467
468 # yuvjpeg
469 tools_yuvjpeg_SOURCES = \
470         tools/yuvjpeg.c
471 tools_yuvjpeg_CFLAGS =
472 tools_yuvjpeg_LDADD = $(JPEG_LIBS)
473
474 # jpegyuv
475 tools_jpegyuv_SOURCES = \
476         tools/jpegyuv.c
477 tools_jpegyuv_CFLAGS =
478 tools_jpegyuv_LDADD = $(JPEG_LIBS)
479
480 # yuv2yuv4mpeg
481 tools_yuv2yuv4mpeg_SOURCES = \
482         tools/yuv2yuv4mpeg.c
483 tools_yuv2yuv4mpeg_CFLAGS =
484 tools_yuv2yuv4mpeg_LDADD =
485
486 # vq_train
487 tools_vq_train_SOURCES = \
488         tools/vq_train.c
489 tools_vq_train_CFLAGS = $(OPENMP_CFLAGS)
490 tools_vq_train_LDADD = $(LIBM)
491
492 # draw_zigzags
493 tools_draw_zigzags_SOURCES = \
494         tools/draw_zigzags.c \
495         src/zigzag4.c \
496         src/zigzag8.c \
497         src/zigzag16.c \
498         src/zigzag32.c \
499         src/zigzag64.c
500 tools_draw_zigzags_CFLAGS =
501 tools_draw_zigzags_LDADD =
502
503
504 endif # ENABLE_TOOLS
505
506 # Tests
507
508 if ENABLE_UNIT_TESTS
509 noinst_PROGRAMS += \
510         src/tests/dcttest \
511         src/tests/ectest \
512         src/tests/test_coef_coder \
513         src/tests/logging_test \
514         src/tests/test_divu_small \
515         src/tests/check_tests
516
517 TESTS = \
518         src/tests/dcttest \
519         src/tests/ectest \
520         src/tests/test_coef_coder \
521         src/tests/logging_test \
522         src/tests/test_divu_small \
523         src/tests/check_tests
524
525 src_tests_dcttest_SOURCES = $(src_dct_SOURCES) src/filter.c
526 src_tests_dcttest_CFLAGS = $(OGG_CFLAGS) \
527  -DOD_DCT_CHECK_OVERFLOW -DOD_DCT_TEST -DOD_ENABLE_ASSERTIONS
528 src_tests_dcttest_LDADD = $(LIBM)
529
530 src_tests_ectest_SOURCES = src/tests/ectest.c
531 src_tests_ectest_CFLAGS = $(OGG_CFLAGS)
532 src_tests_ectest_LDADD = \
533  src/libdaalaenc.la \
534  src/libdaalabase.la \
535  $(LIBM)
536
537 src_tests_test_coef_coder_SOURCES = src/tests/test_coef_coder.c
538 src_tests_test_coef_coder_CFLAGS = $(OGG_CFLAGS)
539 src_tests_test_coef_coder_LDADD = \
540  src/libdaalabase.la \
541  src/libdaaladec.la \
542  src/libdaalaenc.la \
543  $(OGG_LIBS) \
544  $(LIBM)
545
546 src_tests_logging_test_SOURCES = src/tests/logging_test.c
547 src_tests_logging_test_CFLAGS = $(OGG_CFLAGS)
548 src_tests_logging_test_LDADD = \
549  src/libdaalabase.la \
550  src/libdaalaenc.la \
551  $(OGG_LIBS)
552
553 src_tests_test_divu_small_SOURCES = src/tests/test_divu_small.c
554 src_tests_test_divu_small_CFLAGS = $(OGG_CFLAGS)
555 src_tests_test_divu_small_LDADD = \
556  src/libdaalabase.la \
557  $(OGG_LIBS)
558
559 src_tests_check_tests_SOURCES = \
560  src/tests/check_main.c \
561  src/tests/headerencode_test.c
562 src_tests_check_tests_CFLAGS = $(OGG_CFLAGS) $(CHECK_CFLAGS) -Wno-variadic-macros
563 src_tests_check_tests_LDADD = \
564  src/libdaalabase.la \
565  src/libdaaladec.la \
566  src/libdaalaenc.la \
567  $(OGG_LIBS) \
568  $(CHECK_LIBS) \
569  $(LIBM)
570
571 endif
572
573 SUBDIRS=doc
574
575 ACLOCAL_AMFLAGS = -I m4
576
577 AM_CFLAGS = -I$(top_srcdir)/include $(DEPS_CFLAGS)
578
579 dist_doc_DATA = COPYING AUTHORS
580
581 pkgconfigdir = $(libdir)/pkgconfig
582 pkgconfig_DATA = daalaenc.pc daaladec.pc
583
584 debug: DEBUG_OPTIONS = -DOD_ENABLE_ASSERTIONS -DOD_LOGGING_ENABLED
585 debug:
586         $(MAKE) CFLAGS="$(CFLAGS) -O0 -ggdb3 $(DEBUG_OPTIONS)" all
587
588 EXTRA_DIST = \
589         daalaenc.pc.in \
590         daaladec.pc.in \
591         daalaenc-uninstalled.pc.in \
592         daaladec-uninstalled.pc.in \
593         tools/unix/Makefile \
594         unix/Makefile
595
596 # Targets to build and install just the library without the docs
597 daala install-daala: NO_DOXYGEN = 1
598
599 daala: all
600 install-daala: install
601
602 if ENABLE_TOOLS
603 tools: $(tools_TARGETS)
604 else
605 tools:
606         @echo "error: Tools support not enabled. Try running 'configure --enable-tools'."
607 endif
608
609 # Or just the docs
610 docs: doc/doxygen-build.stamp
611
612 install-docs:
613         @if [ -z "$(NO_DOXYGEN)" ]; then \
614           ( cd doc && \
615             echo "Installing documentation in $(DESTDIR)$(docdir)"; \
616             $(INSTALL) -d $(DESTDIR)$(docdir)/html/search; \
617             for f in `find html -type f \! -name "installdox"` ; do \
618               $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$f;     \
619             done ) \
620         fi
621
622 doc/doxygen-build.stamp: doc/Doxyfile $(daalainclude_HEADERS)
623         @[ -n "$(NO_DOXYGEN)" ] || ( cd doc && doxygen && touch $(@F) )
624
625 if HAVE_DOXYGEN
626
627 # Or everything (by default)
628 all-local: docs
629
630 install-data-local: install-docs
631
632 clean-local:
633         $(RM) -r doc/html
634         $(RM) -r doc/latex
635         $(RM) -r doc/man
636         $(RM) doc/doxygen-build.stamp
637         $(RM) doc/doxygen_sqlite3.db
638
639 uninstall-local:
640         $(RM) -r $(DESTDIR)$(docdir)/html
641
642 endif
643
644 # We check this every time make is run, with configure.ac being touched to
645 # trigger an update of the build system files if update_version changes the
646 # current PACKAGE_VERSION (or if package_version was modified manually by a
647 # user with either AUTO_UPDATE=no or no update_version script present - the
648 # latter being the normal case for tarball releases).
649 #
650 # We can't just add the package_version file to CONFIGURE_DEPENDENCIES since
651 # simply running autoconf will not actually regenerate configure for us when
652 # the content of that file changes (due to autoconf dependency checking not
653 # knowing about that without us creating yet another file for it to include).
654 #
655 # The MAKECMDGOALS check is a gnu-make'ism, but will degrade 'gracefully' for
656 # makes that don't support it.  The only loss of functionality is not forcing
657 # an update of package_version for `make dist` if AUTO_UPDATE=no, but that is
658 # unlikely to be a real problem for any real user.
659 $(top_srcdir)/configure.ac: force
660         @case "$(MAKECMDGOALS)" in \
661             dist-hook)                             exit 0       ;; \
662             dist-* | dist | distcheck | distclean) _arg=release ;; \
663         esac; \
664         if ! $(top_srcdir)/update_version $$_arg 2> /dev/null; then \
665             if [ ! -e $(top_srcdir)/package_version ]; then \
666                 echo 'PACKAGE_VERSION="unknown"' > $(top_srcdir)/package_version; \
667             fi; \
668             . $(top_srcdir)/package_version || exit 1; \
669             [ "$(PACKAGE_VERSION)" != "$$PACKAGE_VERSION" ] || exit 0; \
670         fi; \
671         touch $@
672
673 force:
674
675 # Create a minimal package_version file when make dist is run.
676 dist-hook:
677         echo 'PACKAGE_VERSION="$(PACKAGE_VERSION)"' > $(top_distdir)/package_version
678
679 .PHONY: daala install-daala docs install-docs figures tools