Fix obvious typo
[geany-mirror.git] / src / Makefile.am
blob704d896d9b421cc396a363e090e084dd7ae34f6a
1 ## Process this file with automake to produce Makefile.in
4 EXTRA_DIST = \
5         gb.c \
6         plugindata.h \
7         documentprivate.h \
8         filetypesprivate.h \
9         keybindingsprivate.h \
10         pluginprivate.h \
11         projectprivate.h \
12         makefile.win32
14 AM_CPPFLAGS = \
15         -I$(top_srcdir) \
16         -I$(top_srcdir)/scintilla/include \
17         -I$(top_srcdir)/tagmanager/src \
18         -DGTK \
19         -DGEANY_PRIVATE \
20         -DG_LOG_DOMAIN=\""Geany"\" \
21         @GTK_CFLAGS@ @GTHREAD_CFLAGS@ \
22         $(MAC_INTEGRATION_CFLAGS)
24 bin_PROGRAMS = geany
25 lib_LTLIBRARIES = libgeany.la
27 geany_SOURCES = main.c
28 geany_LDADD = libgeany.la $(GTK_LIBS) $(GTHREAD_LIBS) $(INTLLIBS)
29 geany_LDFLAGS =
31 if ENABLE_BINRELOC
32 geany_LDFLAGS += -Wl,-rpath='$$ORIGIN/../lib'
33 endif
35 geany_includedir = $(includedir)/geany
36 geany_include_HEADERS = \
37         app.h \
38         build.h \
39         dialogs.h \
40         document.h \
41         editor.h \
42         encodings.h \
43         filetypes.h \
44         geany.h \
45         gtkcompat.h \
46         highlighting.h \
47         keybindings.h \
48         main.h \
49         msgwindow.h \
50         navqueue.h \
51         plugindata.h \
52         pluginutils.h \
53         prefs.h \
54         project.h \
55         sciwrappers.h \
56         search.h \
57         spawn.h \
58         stash.h \
59         support.h \
60         symbols.h \
61         templates.h \
62         toolbar.h \
63         ui_utils.h \
64         utils.h
66 libgeany_la_SOURCES = \
67         about.c about.h \
68         app.h \
69         build.c build.h \
70         callbacks.c callbacks.h \
71         dialogs.c dialogs.h \
72         document.c document.h \
73         editor.c editor.h \
74         encodings.c encodings.h \
75         filetypes.c filetypes.h \
76         geanyentryaction.c geanyentryaction.h \
77         geanymenubuttonaction.c geanymenubuttonaction.h \
78         geanyobject.c geanyobject.h \
79         geanywraplabel.c geanywraplabel.h \
80         gtkcompat.h \
81         highlighting.c highlighting.h \
82         highlightingmappings.h \
83         keybindings.c keybindings.h \
84         keyfile.c keyfile.h \
85         log.c log.h \
86         libmain.c main.h geany.h \
87         msgwindow.c msgwindow.h \
88         navqueue.c navqueue.h \
89         notebook.c notebook.h \
90         plugins.c plugins.h \
91         pluginutils.c pluginutils.h \
92         prefs.c prefs.h \
93         printing.c printing.h \
94         project.c project.h \
95         sciwrappers.c sciwrappers.h \
96         search.c search.h \
97         socket.c socket.h \
98         spawn.c spawn.h \
99         stash.c stash.h \
100         support.h \
101         symbols.c symbols.h \
102         templates.c templates.h \
103         toolbar.c toolbar.h \
104         tools.c tools.h \
105         sidebar.c sidebar.h \
106         ui_utils.c ui_utils.h \
107         utils.c utils.h
109 if ENABLE_BINRELOC
110 libgeany_la_SOURCES += prefix.c prefix.h
111 endif
113 if ENABLE_MAC_INTEGRATION
114 libgeany_la_SOURCES += osx.c osx.h
115 endif
117 libgeany_la_CFLAGS  = $(AM_CPPFLAGS) @LIBGEANY_CFLAGS@
118 libgeany_la_LDFLAGS = @LIBGEANY_LDFLAGS@
120 libgeany_la_LIBADD = \
121         $(top_builddir)/scintilla/libscintilla.la \
122         $(top_builddir)/tagmanager/ctags/libctags.la \
123         $(top_builddir)/tagmanager/mio/libmio.la \
124         $(top_builddir)/tagmanager/src/libtagmanager.la \
125         @GTK_LIBS@ \
126         @GTHREAD_LIBS@ \
127         $(MAC_INTEGRATION_LIBS) \
128         $(INTLLIBS)
130 # tell automake we have a C++ file so it uses the C++ linker we need for Scintilla
131 nodist_EXTRA_libgeany_la_SOURCES = dummy1.cxx
133 CLEANFILES =
135 if MINGW
136 # build Geany for Windows (possibly on non-Windows systems -- cross-compile)
138 AM_CPPFLAGS += \
139         -DGEANY_DATADIR=\"data\" \
140         -DGEANY_DOCDIR=\"\" \
141         -DGEANY_LIBDIR=\"\" \
142         -DGEANY_LOCALEDIR=\"\" \
143         -DGEANY_PREFIX=\"\"
145 geany_LDADD += geany_private.res
147 WINDRES = $(host_alias)-windres
149 geany_private.res: $(top_srcdir)/geany_private.rc
150         $(WINDRES) -i $(top_srcdir)/geany_private.rc --input-format=rc -o $@ -O coff
152 libgeany_la_SOURCES += win32.c win32.h
153 libgeany_la_LIBADD  += -lole32 -lwsock32 -lcomdlg32
154 libgeany_la_LDFLAGS += -Wl,-luuid -mwindows -mms-bitfields -no-undefined
155 geany_LDFLAGS       += -mwindows -mms-bitfields
157 CLEANFILES          += geany_private.res
159 else
160 # build Geany for all other platforms
162 AM_CPPFLAGS += \
163         -DGEANY_DATADIR=\""$(datadir)"\" \
164         -DGEANY_DOCDIR=\""$(docdir)"\" \
165         -DGEANY_LIBDIR=\""$(libdir)"\" \
166         -DGEANY_LOCALEDIR=\""$(localedir)"\" \
167         -DGEANY_PREFIX=\""$(prefix)"\"
169 libgeany_la_SOURCES += vte.c vte.h
171 endif
173 callbacks.c: signallist.i
175 glade_file=$(top_srcdir)/data/geany.glade
177 signallist.i: $(glade_file) Makefile
178         $(AM_V_GEN)( \
179                 echo '/* This file is auto-generated, do not edit. */' && \
180                 $(SED) -n 's/^.*handler="\([^"]\{1,\}\)".*$$/ITEM(\1)/p' "$(glade_file)" \
181                         | $(SORT) | $(UNIQ) \
182         ) > $@ || { $(RM) $@ && exit 1; }
184 CLEANFILES += signallist.i
186 # Ubuntu ld has a bug so that libtool sees /usr/local/lib as a system path so
187 # doesn't add RPATH, but ld requires explicit ldconfig there, unlike when
188 # installing in /usr/lib.  So, workaround this by calling it explicitly when
189 # installing in /usr/local/lib and libgeany is not found by the linker.
190 fix-ubuntu-libdir:
191         if test "$(DESTDIR)$(libdir)" = /usr/local/lib && \
192            LANG=C ldd "$(DESTDIR)$(bindir)/geany" | grep -q 'libgeany.*not found' \
193         ; then \
194                 ldconfig "$(DESTDIR)$(libdir)"; \
195         fi
197 install-exec-hook: fix-ubuntu-libdir