More generic use of event.
[familia.git] / Makefile.am
1 AUTOMAKE_OPTIONS = gnu subdir-objects
2 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
3 SUBDIRS = po
4
5 EXTRA_DIST = \
6         config.rpath \
7         data/gui.glade \
8         src/gettext.h \
9         doc/CodingStyle
10
11 MAINTAINERCLEANFILES = \
12         aclocal.m4 \
13         config.h.in \
14         config.log \
15         config.status \
16         configure \
17         configure.files \
18         stamp-h.in \
19         depcomp \
20         install-sh \
21         missing
22
23
24 CLEANFILES = \
25         %.o \
26         %.bak \
27         %~ \
28         doxyfile.stamp
29
30 bin_PROGRAMS = bin/familia
31 noinst_HEADERS = src/i18n.h
32 dist_noinst_SCRIPTS = autogen.sh
33
34 bin_familia_SOURCES = \
35         src/dialogs/about_dialog.c \
36         src/dialogs/openfile_dialog.c \
37         src/ui/drawing_area.c \
38         src/ui/scrollbars.c \
39         src/storage/storage.c \
40         src/storage/individual.c \
41         src/storage/family.c \
42         src/storage/positions.c \
43         src/math/positions.c \
44         src/math/camera.c \
45         src/math/yearline.c \
46         src/graphics/individual.c \
47         src/graphics/family.c \
48         src/gedcom/familia_gedcom.c \
49         src/memory_stack.c \
50         src/gui.c \
51         src/main.c \
52         src/debug.c \
53         src/commandline.c
54
55 bin_familia_CPPFLAGS = \
56         $(bin_familia_CFLAGS) \
57         -Wall -pedantic -Wextra \
58         @GEDCOM_CFLAGS@ \
59         -I$(top_srcdir)/src \
60         -Wl,--export-dynamic
61
62 bin_familia_LDADD = \
63         $(bin_familia_LIBS) \
64         $(GLU_LIBS) \
65         @GEDCOM_LIBS@ \
66         -L/usr/lib \
67         -lzip -lm
68
69 bin_familia_LDFLAGS = $(LTLIBINTL)
70
71 localedir = $(datadir)/locale
72
73 DEFS = -DLOCALEDIR=\"$(localedir)\" \
74          -DDATADIR=\"$(pkgdatadir)\" \
75         @DEFS@
76
77 all-local: doxyfile.stamp
78         test -d bin/data || mkdir bin/data
79         cp data/gui.glade bin/data/
80         cp -r data/pixmaps bin/data/
81
82 # Documentation
83
84 if HAVE_DOXYGEN
85
86 directory = $(top_srcdir)/doc/man/man3
87
88 doxyfile.stamp:
89         $(DOXYGEN) Doxyfile
90         echo Timestamp > doxyfile.stamp
91
92 #all-local: doxyfile.stamp
93
94 clean-local:
95         rm -rf $(top_srcdir)/doc/man
96
97 endif
98
99 # Localization
100
101 check-gettext:
102         @if test x$(USE_NLS) != "xyes" ; then echo "Missing gettext. Rerun configure and check for" \
103         "'checking whether to use NLS... yes'!" ; exit 1 ; fi
104
105 update-po: check-gettext
106         @find $(srcdir)/src $(srcdir)/data -name '*[glade|c|h]' -type f -print | sort > $(srcdir)/po/POTFILES.in.2 ; \
107         if diff $(srcdir)/po/POTFILES.in $(srcdir)/po/POTFILES.in.2 >/dev/null 2>&1 ; then \
108                 rm -f $(srcdir)/po/POTFILES.in.2 ; \
109         else \
110                 mv $(srcdir)/po/POTFILES.in.2 $(srcdir)/po/POTFILES.in ; \
111         fi
112         cd po && $(MAKE) $(AM_MAKEFLAGS) update-po
113
114 update-gmo: check-gettext
115         cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo
116
117 force-update-gmo: check-gettext
118         touch po/*.po
119         cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo
120
121 force-update-gmo-%: check-gettext
122         @language=`echo $@ | sed s/force-update-gmo-//` ; \
123         if test ! -f po/$$language.po ; then echo "file po/$$language.po does not exist" ; exit 1 ; fi ; \
124         touch po/$$language.po ; \
125         cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo
126
127 .PHONY: check-gettext update-po update-gmo force-update-gmo