1 # Process this file with automake to generate a GNU Makefile
3 ########################################################################
4 # put file lists and special compile rules here
6 bin_SCRIPTS = gphoto2-config
8 EXTRA_DIST = HACKING MAINTAINERS TESTERS installcheck.mk README.packaging
10 # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS()
11 SUBDIRS = @subdirs@ libgphoto2 camlibs tests examples po packaging doc
13 EXTRA_DIST += libgphoto2.pc.in
14 pkgconfig_DATA = libgphoto2.pc
16 EXTRA_DIST += libgphoto2-uninstalled.pc.in
17 noinst_DATA = libgphoto2-uninstalled.pc
19 EXTRA_DIST += ChangeLog
21 doc_DATA = AUTHORS COPYING NEWS
22 doc_DATA += ABOUT-NLS ChangeLog
24 EXTRA_DIST += README.in README
27 EXTRA_DIST += README.packaging
28 doc_DATA += README.packaging
30 nobase_include_HEADERS = \
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
44 DISTCLEANFILES = libgphoto2/gphoto2-endian.h
46 # we use just ONE .PHONY target in order not to confuse automake
48 .PHONY: rpm cvs-tags source-code-check install-drivers
50 ########################################################################
51 # source code check maintenance task
53 # This finds code patterns we don't want to have.
55 # Use it to get rid of existing patterns and make sure they aren't
58 # The output is meant to be read and interpreted by human programmers.
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' {} \;
69 ########################################################################
70 # Shortcut for installation of a subset of camlibs/drivers
71 # Usage: make DRIVER="canon.la ptp2.la" install-drivers
74 cd camlibs && $(MAKE) DRIVERS="$(DRIVERS)" install-drivers
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.
82 ACLOCAL_AMFLAGS = -I auto-m4 -I m4m
85 ########################################################################
86 # The following rules are only interesting if you want to create
87 # distribution packages (as source tarballs or system specific packages)
94 $(MAKE) -C packaging/rpm rpm
95 @echo "The RPM packages should now be found in packaging/rpm/RPMS"
99 @echo "Dummy $@ target"
102 # add CVS tags - used only by the project maintainer to tag the files of a
105 @echo cvs tag "@PACKAGE@-$$(echo '@VERSION@' | sed -e 's/\./_/g' -e 's/rc/-rc/g')"
109 ########################################################################
110 # Compatibility for header inclusions.
112 # - Old code has -I/usr/include/gphoto2
113 # #include <gphoto2-camera.h>
115 # - New code has -I/usr/include
116 # #include <gphoto2/gphoto2-camera.h>
119 rm -f $(DESTDIR)$(includedir)/gphoto2/gphoto2
120 $(INSTALL) -m 0755 -d $(DESTDIR)$(includedir)/gphoto2
121 $(LN_S) . $(DESTDIR)$(includedir)/gphoto2/gphoto2
124 rm -f $(DESTDIR)$(includedir)/gphoto2/gphoto2