Merge pull request #3648 from techee/nim_lexer
[geany-mirror.git] / src / Makefile.am
blobb2f06ed2ac9ec64e6f06f710762efd07452ee582
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@ \
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) $(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         pluginextension.h \
55         pluginutils.h \
56         prefs.h \
57         project.h \
58         sciwrappers.h \
59         search.h \
60         spawn.h \
61         stash.h \
62         support.h \
63         symbols.h \
64         templates.h \
65         toolbar.h \
66         ui_utils.h \
67         utils.h
69 libgeany_la_SOURCES = \
70         about.c about.h \
71         app.h \
72         build.c build.h \
73         callbacks.c callbacks.h \
74         dialogs.c dialogs.h \
75         document.c document.h \
76         editor.c editor.h \
77         encodings.c encodings.h \
78         filetypes.c filetypes.h \
79         geanyentryaction.c geanyentryaction.h \
80         geanymenubuttonaction.c geanymenubuttonaction.h \
81         geanyobject.c geanyobject.h \
82         geanywraplabel.c geanywraplabel.h \
83         gtkcompat.h \
84         highlighting.c highlighting.h \
85         highlightingmappings.h \
86         keybindings.c keybindings.h \
87         keyfile.c keyfile.h \
88         log.c log.h \
89         libmain.c main.h geany.h \
90         msgwindow.c msgwindow.h \
91         navqueue.c navqueue.h \
92         notebook.c notebook.h \
93         pluginextension.c pluginextension.h \
94         plugins.c plugins.h \
95         pluginutils.c pluginutils.h \
96         prefs.c prefs.h \
97         printing.c printing.h \
98         project.c project.h \
99         sciwrappers.c sciwrappers.h \
100         search.c search.h \
101         socket.c socket.h \
102         spawn.c spawn.h \
103         stash.c stash.h \
104         support.h \
105         symbols.c symbols.h \
106         templates.c templates.h \
107         toolbar.c toolbar.h \
108         tools.c tools.h \
109         sidebar.c sidebar.h \
110         ui_utils.c ui_utils.h \
111         utils.c utils.h
113 if ENABLE_BINRELOC
114 libgeany_la_SOURCES += prefix.c prefix.h
115 endif
117 if ENABLE_MAC_INTEGRATION
118 libgeany_la_SOURCES += osx.c osx.h
119 endif
121 libgeany_la_CFLAGS  = $(AM_CPPFLAGS) @LIBGEANY_CFLAGS@
122 libgeany_la_LDFLAGS = @LIBGEANY_LDFLAGS@
124 libgeany_la_LIBADD = \
125         $(top_builddir)/scintilla/liblexilla.la \
126         $(top_builddir)/scintilla/libscintilla.la \
127         $(builddir)/tagmanager/libtagmanager.la \
128         @GTK_LIBS@ \
129         $(MAC_INTEGRATION_LIBS) \
130         $(INTLLIBS)
132 # tell automake we have a C++ file so it uses the C++ linker we need for Scintilla
133 nodist_EXTRA_libgeany_la_SOURCES = dummy1.cxx
134 nodist_EXTRA_geany_SOURCES = dummy2.cxx
136 CLEANFILES =
138 if MINGW
139 # build Geany for Windows (possibly on non-Windows systems -- cross-compile)
141 AM_CPPFLAGS += \
142         -DGEANY_DATADIR=\"data\" \
143         -DGEANY_DOCDIR=\"\" \
144         -DGEANY_LIBDIR=\"\" \
145         -DGEANY_LIBEXECDIR=\"\" \
146         -DGEANY_LOCALEDIR=\"\" \
147         -DGEANY_PREFIX=\"\"
149 geany_LDADD += geany_private.res
151 WINDRES = $(host_alias)-windres
153 geany_private.res: $(top_srcdir)/geany_private.rc
154         $(WINDRES) -i $(top_srcdir)/geany_private.rc --input-format=rc -o $@ -O coff
156 libgeany_la_SOURCES += win32.c win32.h
157 libgeany_la_LIBADD  += -lole32 -lwsock32 -lcomdlg32
158 libgeany_la_LDFLAGS += -mwindows -mms-bitfields -no-undefined
159 geany_LDFLAGS       += -mwindows -mms-bitfields
161 CLEANFILES          += geany_private.res
163 else
164 # build Geany for all other platforms
166 AM_CPPFLAGS += \
167         -DGEANY_DATADIR=\""$(datadir)"\" \
168         -DGEANY_DOCDIR=\""$(docdir)"\" \
169         -DGEANY_LIBDIR=\""$(libdir)"\" \
170         -DGEANY_LIBEXECDIR=\""$(libexecdir)"\" \
171         -DGEANY_LOCALEDIR=\""$(localedir)"\" \
172         -DGEANY_PREFIX=\""$(prefix)"\"
174 libgeany_la_SOURCES += vte.c vte.h
176 endif
178 callbacks.c: signallist.i
180 glade_file=$(top_srcdir)/data/geany.glade
182 signallist.i: $(glade_file) Makefile
183         $(AM_V_GEN)$(top_srcdir)/scripts/gen-signallist.sh $(glade_file) $@
185 CLEANFILES += signallist.i
187 # install the run script
188 if MINGW
189 dist_pkglibexec_SCRIPTS = geany-run-helper.bat
190 endif
192 # Ubuntu ld has a bug so that libtool sees /usr/local/lib as a system path so
193 # doesn't add RPATH, but ld requires explicit ldconfig there, unlike when
194 # installing in /usr/lib.  So, workaround this by calling it explicitly when
195 # installing in /usr/local/lib and libgeany is not found by the linker.
196 fix-ubuntu-libdir:
197         if test "$(DESTDIR)$(libdir)" = /usr/local/lib && \
198            LANG=C ldd "$(DESTDIR)$(bindir)/geany" | grep -q 'libgeany.*not found' \
199         ; then \
200                 ldconfig "$(DESTDIR)$(libdir)"; \
201         fi
203 install-exec-hook: fix-ubuntu-libdir