scripts: Add gmpc-vala-style.sh
[gmpc.git] / src / Makefile.am
bloba0c0e91ad5fd4dc60b698cc1930b7b68de20c4ff
1 if EXTRA_VERSION
2 REVISION=@EXTRA_VERSION@
3 else
4 REVISION=`git rev-parse --short master`
5 endif
6 CONF_VERSION=0
7 -include Makefile.config
9 bin_PROGRAMS=gmpc
11 gmpc_VALAFLAGS=--pkg=gmodule-2.0 --pkg=config --pkg=gtk+-2.0 --pkg=gmpc --pkg=libmpd --pkg=libxml-2.0  --pkg=fix --vapidir=$(top_srcdir)/src/vapi/ --basedir=$(top_builddir)/src/ -H gmpc-extras.h --library=gmpc-extras --use-header
13 VALA_VAPI_FILES=\
14     vapi/gmpc.vapi\
15     vapi/libmpd.vapi\
16     vapi/config.vapi
19 PLUGIN_FILES=\
20     Plugins/extraplaylist.c\
21     Plugins/AutoMPD.vala\
22     Plugins/sidebar-search.vala\
23         Plugins/sidebar-play-queue-time.vala\
24     Plugins/sidebar-next-song.vala
28 gmpc_WIDGETS_FILES=\
29     Widgets/GmpcVolume.vala\
30     Widgets/gmpc-progress.vala\
31     Widgets/mpd-async-request.c\
32     Widgets/gmpc-song-list.vala\
33     Widgets/gmpc-clicklabel.vala\
34     Widgets/playlist3-messages.c\
35     Widgets/gmpc-image-async.vala\
36     Widgets/advanced_settings.vala\
37     Widgets/gmpc-widgets-qtable.vala\
38     Widgets/gmpc-widgets-popupmenu.vala\
39     Widgets/gmpc-metadata-backdrop.vala\
40     Widgets/gmpc-metadata-text-label.vala\
41     Widgets/gmpc-metadata-similarsongs.vala\
42     Widgets/gmpc-metadata-similarartists.vala\
43     Widgets/gmpc-profiles.vala\
44         Widgets/gmpc-sidebar-view.vala\
45     Widgets/gmpc-stats-label.vala\
46         Widgets/gmpc-widgets-overlay.vala\
47     GUI/control_window.c\
48     GUI/title_header.c\
49     GUI/status_icon.c\
50     GUI/cmd.c
52 #    GUI/thv.c
54 gmpc_TOOLS_FILES=\
55     Tools/gmpc-database-update-tracker.vala\
56     Tools/gmpc-metadata-prefetcher.vala\
57     Tools/gmpc-liststore-sort.vala\
58     Tools/gmpc-metadata-appearance.vala \
59     Tools/gmpc_easy_download.c\
60     Tools/mpd-easy-commands.c\
61     Tools/advanced-search.c\
62     Tools/setup-assistant.c\
63     Tools/bug-information.c\
64     Tools/mpdinteraction.c\
65     Tools/pixbuf-cache.c\
66     Tools/url-fetcher.c\
67     Tools/plugin-man.c\
68     Tools/mm-keys.c\
69     Tools/misc.c\
70     Tools/log.c\
71     Tools/ipc.c
74 # Browsers
76 gmpc_BROWSERS_FILES=\
77         browsers/playlist3-current-playlist-browser.c\
78     browsers/gmpc-metadata-browser2.vala\
79         browsers/playlist3-playlist-editor.c\
80         browsers/playlist3-find2-browser.c\
81         browsers/playlist3-tag2-browser.c\
82         browsers/playlist3-file-browser.c\
83     browsers/gmpc-nowplaying2.vala\
84         browsers/server-information.c
86 gmpc_SOURCES=\
87     $(gmpc_WIDGETS_FILES)\
88     $(gmpc_BROWSERS_FILES)\
89     $(gmpc_TOOLS_FILES)\
90         $(gmpc_egg_FILES)\
91     $(PLUGIN_FILES)\
92     vala/gmpc-connection.vala\
93     vala/gmpc-easy-command.vala\
94     vala/gmpc-favorites.vala\
95     vala/gmpc-mpddata-treeview-tooltip.vala\
96     vala/gmpc-plugin.vala\
97     vala/gmpc-url-fetching-gui.vala\
98     vala/gmpc-metadata-editwindow.vala\
99     vala/gmpc-paned-size-group.vala\
100     vala/gmpc-sidebar-plugins.vala\
101     MetaData/metadata.c\
102     preferences.c\
103     tray-icon2.c\
104     playlist3.c\
105     config1.c\
106     options.c\
107     plugin.c\
108     main.c
110 #    MetaData/metadata-cache-sqlite.c\
111 #    MetaData/metadata-cache.c\
115 nodist_gmpc_SOURCES=\
116     $(gmpc_GOBCFILES)
118 gmpc_LDADD=
120 if WIN32
121 gmpc_DEPENDENCIES = gmpc-win32.o
122 gmpc_LDADD += gmpc-win32.o
123 endif
125 BUILT_SOURCES=\
126               $(gmpc_GOBSTAMPFILES)\
127               revisiont.h
129 gmpc-win32.o: gmpc-win32.rc
130         $(LIBTOOL) --mode=compile --tag=RC $(RC) -i $^ -o $@
132 .PHONY: revisiont.h
133 revisiont.h:
134         @if test "$(REVISION)" != "$(CONF_VERSION)"; then\
135                 echo "Writing new Makefile.config file";\
136                 echo "CONF_VERSION=$(REVISION)" > Makefile.config;\
137                 echo "static const char *revision = \"$(REVISION)""\"; " > revision.h;\
138         fi;
140 revision.h:
141         echo "static const char *revision = \"$(REVISION)""\"; " > revision.h;
143 INCLUDES=\
144         -DPIXMAP_PATH=\""$(pkgdatadir)/icons/"\" \
145         -DGLADE_PATH=\""$(pkgdatadir)"\" \
146         -DVERSION=\"@VERSION@\"\
147         -DGMPC_BUILD=1\
148         -I$(top_srcdir)\
149         -I$(top_builddir)\
150         -I$(top_srcdir)/src\
151         -I$(top_builddir)/src\
152         -I$(top_srcdir)/src/egg\
153         -I$(top_builddir)/src/egg\
154         -I$(top_srcdir)/src/Tools\
155         -I$(top_builddir)/src/Tools\
156         -I$(top_srcdir)/src/vala\
157         -I$(top_builddir)/src/vala\
158         -I$(top_srcdir)/src/Widgets\
159         -I$(top_builddir)/src/Widgets\
160         -I$(top_srcdir)/src/GUI\
161         -I$(top_builddir)/src/GUI\
162         -I$(top_srcdir)/src/MetaData/\
163         -I$(top_builddir)/src/MetaData/
167 LIBS= \
168         @glib_LIBS@ @LIBS@ \
169         @libmpd_LIBS@ \
170         @gobject_LIBS@\
171         @gtk_LIBS@\
172         @gmodule_LIBS@\
173         @gthread_LIBS@\
174         @libsoup_LIBS@\
175         @libgio_LIBS@\
176         @SPIFF_LIBS@\
177         @libxspf_LIBS@\
178         @libxml2_LIBS@\
179         @libx11_LIBS@\
180     @libglyr_LIBS@\
181         @sqlite3_LIBS@\
182         -lz
185 if HAVE_UNIQUE
186     LIBS += @unique_LIBS@
187 endif
189 if HAVE_APP_INDICATOR
190     LIBS += @APP_INDICATOR_LIBS@
191 endif
193 AM_LDFLAGS = \
194         @EXTRA_LDFLAGS@\
195         @LDFLAGS@
199 AM_CFLAGS = @CFLAGS@\
200         @glib_CFLAGS@\
201         @libmpd_CFLAGS@ \
202         @gobject_CFLAGS@\
203         @gtk_CFLAGS@\
204         @gmodule_CFLAGS@\
205     @libxspf_CFLAGS@\
206         @gthread_CFLAGS@\
207         @libsoup_CFLAGS@\
208         @libgio_CFLAGS@\
209     @sqlite3_CFLAGS@\
210     @libxml2_CFLAGS@\
211     @libx11_CFLAGS@\
212     @EXTRA_CFLAGS@\
213     @libglyr_CFLAGS@\
214         -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\"\
215         -DPACKAGE_DATA_DIR=\""$(datarootdir)"\"
218 if HAVE_UNIQUE
219     AM_CFLAGS += @unique_CFLAGS@
220 endif
222 if HAVE_APP_INDICATOR
223     AM_CFLAGS += @APP_INDICATOR_CFLAGS@
224 endif
226 if MAINTAINER_MODE
227 AM_CFLAGS+=-Wall -Wdeclaration-after-statement -Wshadow -fno-common -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wnested-externs -Wmissing-format-attribute -Waggregate-return -Wundef -Wmissing-include-dirs -Winit-self -Wswitch-default -Wswitch-enum -g -O1
228 endif
231 nodist_gmpcinclude_HEADERS=\
232         gmpc-meta-watcher.h\
233         gmpc-mpddata-model.h\
234         gmpc-mpddata-model-sort.h\
235         gmpc-mpddata-treeview.h\
236         gmpc-metaimage.h\
237         gmpc-meta-text-view.h
239 gmpcinclude_HEADERS = \
240                 plugin.h        \
241                 config1.h       \
242         Widgets/mpd-async-request.h\
243         Widgets/playlist3-messages.h\
244         Tools/gmpc_easy_download.h\
245         Tools/mpdinteraction.h\
246         Tools/misc.h\
247         gmpc-extras.h\
248         gmpc-version.h\
249         GUI/status_icon.h\
250                 MetaData/metadata.h
252 gmpcincludedir =$(includedir)/gmpc/
254 EXTRA_DIST=\
255                 playlist3.h\
256         tray-icon2.h\
257                 main.h\
258         Widgets/mpd-async-request.h\
259                 config-defaults.h\
260                 browsers/playlist3-tag2-browser.h\
261                 browsers/playlist3-file-browser.h\
262                 browsers/playlist3-current-playlist-browser.h\
263                 browsers/playlist3-find2-browser.h\
264                 browsers/playlist3-playlist-editor.h\
265         gtktransition.h\
266         plugin-internal.h\
267         Tools/mpd-easy-commands.h\
268         Tools/setup-assistant.h\
269                 Tools/bug-information.h\
270         Tools/plugin-man.h\
271         Tools/log.h\
272                 Tools/mm-keys.h\
273                 Tools/misc.h\
274                 MetaData/metadata.h\
275         MetaData/html2utf8.h\
276                 egg/eggcolumnchooserdialog.h\
277                 egg/eggcolumnmodel.h\
278                 Tools/advanced-search.h\
279                 Tools/setup-assistant.h\
280                 Tools/ipc.h\
281                 revision.h\
282                 gmpc-version.h.in\
283                 Tools/bug-information.h\
284                 options.h\
285                 gmpc-win32.rc\
286         Tools/pixbuf-cache.h\
287         preferences.h\
288         internal-plugins.h\
289         GUI/control_window.h\
290         GUI/title_header.h\
291         GUI/cmd.h\
292         $(VALA_VAPI_FILES)\
293         $(gmpc_GOBFILES)
295 #        GUI/thv.h
296 #               MetaData/metadata-cache.h\
297 #               MetaData/metadata-cache-sqlite.h\
300 DISTCLEANFILES=\
301                            revision.h\
302                            Makefile.config
304 CLEANFILES=\
305         $(gmpc_GOBCFILES)\
306         $(gmpc_GOBHFILES)\
307         $(gmpc_GOBSTAMPFILES)
310 # GOB stuff
312 gmpc_GOBFILES = \
313                 gmpc-meta-watcher.gob\
314                 gmpc-metaimage.gob\
315                 gmpc-meta-text-view.gob\
316                 gmpc-mpddata-model.gob\
317                 gmpc-mpddata-model-playlist.gob\
318                 gmpc-mpddata-model-sort.gob\
319                 gmpc-mpddata-treeview.gob
321 gmpc_GOBSTAMPFILES=\
322         $(gmpc_GOBFILES:.gob=.gob.stamp)
324 gmpc_GOBCFILES=\
325         $(gmpc_GOBFILES:.gob=.c)
327 gmpc_GOBHFILES=\
328         $(gmpc_GOBFILES:.gob=.h)\
329         $(gmpc_GOBFILES:.gob=-private.h)
331 %.gob.stamp: %.gob
332         $(QUIET_GE) echo "  GOB   $< - $(top_builddir)/src/gob/"
333         @GOB2@ --no-lines --always-private-header $<
334         @touch $(top_builddir)/src/$@
338 # Embedded egg
340 gmpc_egg_FILES=\
341         egg/eggcolumnchooserdialog.c\
342         egg/eggcolumnmodel.c