Remove generated files
[framework/connectivity/libgphoto2.git] / Makefile.am
1 # Process this file with automake to generate a GNU Makefile
2
3 ########################################################################
4 # put file lists and special compile rules here
5
6 bin_SCRIPTS = gphoto2-config
7
8 EXTRA_DIST = HACKING MAINTAINERS TESTERS installcheck.mk README.packaging
9
10 # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS()
11 SUBDIRS = @subdirs@ libgphoto2 camlibs tests examples po packaging doc
12
13 EXTRA_DIST    += libgphoto2.pc.in
14 pkgconfig_DATA = libgphoto2.pc
15
16 EXTRA_DIST += libgphoto2-uninstalled.pc.in
17 noinst_DATA = libgphoto2-uninstalled.pc
18
19 EXTRA_DIST += ChangeLog
20 EXTRA_DIST += INSTALL
21 doc_DATA = AUTHORS COPYING NEWS
22 doc_DATA += ABOUT-NLS ChangeLog
23
24 EXTRA_DIST += README.in README
25 doc_DATA   += README
26
27 EXTRA_DIST += README.packaging
28 doc_DATA   += README.packaging
29
30 nobase_include_HEADERS =        \
31         gphoto2/gphoto2.h               \
32         gphoto2/gphoto2-abilities-list.h\
33         gphoto2/gphoto2-camera.h        \
34         gphoto2/gphoto2-context.h       \
35         gphoto2/gphoto2-file.h          \
36         gphoto2/gphoto2-filesys.h       \
37         gphoto2/gphoto2-library.h       \
38         gphoto2/gphoto2-list.h          \
39         gphoto2/gphoto2-result.h        \
40         gphoto2/gphoto2-setting.h       \
41         gphoto2/gphoto2-version.h       \
42         gphoto2/gphoto2-widget.h
43
44 DISTCLEANFILES = libgphoto2/gphoto2-endian.h
45
46 # we use just ONE .PHONY target in order not to confuse automake
47
48 .PHONY: rpm cvs-tags source-code-check install-drivers
49
50 ########################################################################
51 # source code check maintenance task
52 #
53 #   This finds code patterns we don't want to have.
54 #
55 #   Use it to get rid of existing patterns and make sure they aren't
56 #   reintroduced later.
57 #
58 #   The output is meant to be read and interpreted by human programmers.
59
60 source-code-check:
61         @echo "######## Finding // comments"
62         find . -type f -name '*.[ch]' -exec egrep -H '(^//|[^:]//)' {} \;
63         @echo "######## Finding remainders of Arnaud's comment replacement"
64         find . -type f -name '*.[ch]' -exec egrep -H 'http:/\*' {} \;
65         @echo "######## Finding explicit libintl.h references"
66         find . -type f -name '*.[ch]' -exec egrep -H '^#.*include.*libintl\.h' {} \;
67
68
69 ########################################################################
70 # Shortcut for installation of a subset of camlibs/drivers
71 # Usage: make DRIVER="canon.la ptp2.la" install-drivers
72
73 install-drivers:
74         cd camlibs && $(MAKE) DRIVERS="$(DRIVERS)" install-drivers
75
76
77 ########################################################################
78 # The following default options for aclocal and automake
79 # are required in the top level Makefile.am for the automatic 
80 # re-building of the build system files.
81
82 ACLOCAL_AMFLAGS = -I auto-m4 -I m4m
83
84
85 ########################################################################
86 # The following rules are only interesting if you want to create
87 # distribution packages (as source tarballs or system specific packages)
88
89 if ENABLE_RPM
90
91 # create RPM packages
92 rpm: Makefile
93         $(MAKE) dist
94         $(MAKE) -C packaging/rpm rpm
95         @echo "The RPM packages should now be found in packaging/rpm/RPMS"
96
97 else
98 rpm:
99         @echo "Dummy $@ target"
100 endif
101
102 # add CVS tags - used only by the project maintainer to tag the files of a
103 # released version
104 cvs-tags: Makefile
105         @echo cvs tag "@PACKAGE@-$$(echo '@VERSION@' | sed -e 's/\./_/g' -e 's/rc/-rc/g')"
106
107
108
109 ########################################################################
110 # Compatibility for header inclusions.
111 #
112 # - Old code has -I/usr/include/gphoto2
113 #   #include <gphoto2-camera.h>
114 #
115 # - New code has -I/usr/include
116 #   #include <gphoto2/gphoto2-camera.h>
117
118 install-data-local:
119         rm -f $(DESTDIR)$(includedir)/gphoto2/gphoto2
120         $(INSTALL) -m 0755 -d $(DESTDIR)$(includedir)/gphoto2
121         $(LN_S) . $(DESTDIR)$(includedir)/gphoto2/gphoto2
122
123 uninstall-local:
124         rm -f $(DESTDIR)$(includedir)/gphoto2/gphoto2