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