minor changes in cmake flags
[openjpeg.git] / doc / Makefile.nix
1 #doc Makefile.nix
2 include ../config.nix
3
4 doc_dir = $(prefix)/share/doc/openjpeg-$(MAJOR).$(MINOR)
5 man_dir = $(prefix)/share/man
6
7 ifeq ($(HAS_DOXYGEN),yes)
8 docs:
9         doxygen Doxyfile.dox
10
11 endif
12
13 clean:
14         rm -rf html
15
16 install:
17         cp man/man1/* .
18         cp man/man3/* .
19         install -d $(doc_dir)
20         install -d $(man_dir)/man1 $(man_dir)/man3
21 ifeq ($(WITH_JPWL),yes)
22         (cd $(man_dir)/man1 && rm -f JPWL_image_to_j2k* JPWL_j2k_to_image* )
23         (cd $(man_dir)/man3 && rm -f JPWL_libopenjpeg* )
24 endif
25         (cd $(man_dir)/man1 && rm -f image_to_j2k* j2k_to_image* j2k_dump* )
26         (cd $(man_dir)/man3 && rm -f libopenjpeg* )
27         gzip -f image_to_j2k.1 j2k_to_image.1 j2k_dump.1 libopenjpeg.3
28         cp -f image_to_j2k.1.gz j2k_to_image.1.gz j2k_dump.1.gz $(man_dir)/man1
29         cp -f libopenjpeg.3.gz $(man_dir)/man3
30         rm -f *\.gz
31 ifeq ($(WITH_JPWL),yes)
32         (cd $(man_dir)/man1 && \
33         ln -sf image_to_j2k.1.gz JPWL_image_to_j2k.1.gz && \
34         ln -sf j2k_to_image.1.gz JPWL_j2k_to_image.1.gz)
35         (cd $(man_dir)/man3 && ln -sf libopenjpeg.3.gz JPWL_libopenjpeg.3.gz)
36 endif
37         cp ../LICENSE ../CHANGES $(doc_dir)
38
39 uninstall:
40         rm -rf $(doc_dir)
41 ifeq ($(WITH_JPWL),yes) 
42         (cd $(man_dir)/man1 && rm -f JPWL_image_to_j2k* JPWL_j2k_to_image* )
43         (cd $(man_dir)/man3 && rm -f JPWL_libopenjpeg* )
44 endif
45         (cd $(man_dir)/man1 && rm -f image_to_j2k* j2k_to_image* j2k_dump* )
46         (cd $(man_dir)/man3 && rm -f libopenjpeg* )
47