Mercurial > minori
comparison Makefile.am @ 252:a0eeb2cc7e6d
*: resolve make distcheck failures
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Tue, 06 Feb 2024 02:24:49 -0500 |
parents | c130f47f6f48 |
children | b3549da699a6 |
comparison
equal
deleted
inserted
replaced
251:4d635d3e168a | 252:a0eeb2cc7e6d |
---|---|
1 bin_PROGRAMS = minori | 1 bin_PROGRAMS = minori |
2 | |
3 # Localization | |
2 | 4 |
3 minori_locale_ts = \ | 5 minori_locale_ts = \ |
4 rc/locale/en_GB.ts \ | 6 rc/locale/en_GB.ts \ |
5 rc/locale/es.ts | 7 rc/locale/es.ts |
6 | 8 |
7 .ts.qm: | |
8 $(MKDIR_P) `dirname $@`; \ | |
9 $(LRELEASE) $< -qm $@ | |
10 | |
11 minori_locale_qm = $(minori_locale_ts:.ts=.qm) | 9 minori_locale_qm = $(minori_locale_ts:.ts=.qm) |
12 | 10 |
13 # this has to be in the root build folder | |
14 rc/locale/translations.qrc: $(minori_locale_qm) | 11 rc/locale/translations.qrc: $(minori_locale_qm) |
12 $(MKDIR_P) $$(dirname $@); \ | |
15 printf "<!DOCTYPE rcc><RCC version=\"1.0\">\n\t<qresource prefix=\"locale/\">\n" > $@; \ | 13 printf "<!DOCTYPE rcc><RCC version=\"1.0\">\n\t<qresource prefix=\"locale/\">\n" > $@; \ |
16 for q in $(minori_locale_qm); do \ | 14 for q in $(minori_locale_qm); do \ |
17 printf "\t\t<file>%s</file>\n" "`basename $$q`" >> $@; \ | 15 printf "\t\t<file>%s</file>\n" "$$(basename $$q)" >> $@; \ |
18 done; | 16 done; |
19 printf "\t</qresource>\n</RCC>\n" >> $@; | 17 printf "\t</qresource>\n</RCC>\n" >> $@; |
20 | 18 |
19 # Qt resources | |
20 | |
21 minori_qtrc = \ | 21 minori_qtrc = \ |
22 $(top_srcdir)/rc/icons/icons.qrc \ | 22 $(top_srcdir)/rc/icons/icons.qrc \ |
23 $(top_srcdir)/rc/player_data.qrc \ | 23 $(top_srcdir)/rc/player_data.qrc |
24 rc/locale/translations.qrc | 24 |
25 # various things we want to distribute | |
26 | |
27 minori_icons_png = \ | |
28 $(top_srcdir)/rc/icons/16x16/arrow-circle-315.png \ | |
29 $(top_srcdir)/rc/icons/16x16/calendar.png \ | |
30 $(top_srcdir)/rc/icons/16x16/chart.png \ | |
31 $(top_srcdir)/rc/icons/16x16/clock-history-frame.png \ | |
32 $(top_srcdir)/rc/icons/16x16/cross-button.png \ | |
33 $(top_srcdir)/rc/icons/16x16/document-list.png \ | |
34 $(top_srcdir)/rc/icons/16x16/feed.png \ | |
35 $(top_srcdir)/rc/icons/16x16/film.png \ | |
36 $(top_srcdir)/rc/icons/16x16/gear.png \ | |
37 $(top_srcdir)/rc/icons/16x16/magnifier.png \ | |
38 $(top_srcdir)/rc/icons/16x16/navigation-270-button.png \ | |
39 $(top_srcdir)/rc/icons/16x16/plus-button.png \ | |
40 $(top_srcdir)/rc/icons/24x24/application-export.png \ | |
41 $(top_srcdir)/rc/icons/24x24/application-sidebar-list.png \ | |
42 $(top_srcdir)/rc/icons/24x24/arrow-circle-double-135.png \ | |
43 $(top_srcdir)/rc/icons/24x24/feed.png \ | |
44 $(top_srcdir)/rc/icons/24x24/folder-open.png \ | |
45 $(top_srcdir)/rc/icons/24x24/gear.png \ | |
46 $(top_srcdir)/rc/icons/24x24/globe.png \ | |
47 $(top_srcdir)/rc/icons/24x24/inbox-film.png \ | |
48 $(top_srcdir)/rc/icons/24x24/megaphone.png \ | |
49 $(top_srcdir)/rc/icons/24x24/question.png \ | |
50 $(top_srcdir)/rc/icons/favicon.png | |
51 | |
52 minori_linux_rc = \ | |
53 $(top_srcdir)/rc/linux/Minori.desktop \ | |
54 $(top_srcdir)/rc/linux/Minori.png | |
55 | |
56 minori_osx_rc = \ | |
57 $(top_srcdir)/rc/osx/Minori.app/Contents/Resources/Minori.icns \ | |
58 $(top_srcdir)/rc/osx/Minori.app/Contents/Info.plist \ | |
59 $(top_srcdir)/rc/osx/Minori.app/Contents/PkgInfo | |
60 | |
61 minori_win32_rc = \ | |
62 $(top_srcdir)/rc/win32/dark/dark.qrc \ | |
63 $(top_srcdir)/rc/win32/dark/dark.qss \ | |
64 $(top_srcdir)/rc/win32/favicon.ico \ | |
65 $(top_srcdir)/rc/win32/resource.rc \ | |
66 $(top_srcdir)/rc/win32/version.rc | |
67 | |
68 minori_scripts = \ | |
69 $(top_srcdir)/scripts/osx/deploy_build.sh \ | |
70 $(top_srcdir)/scripts/win32/deploy_build.sh | |
71 | |
72 EXTRA_DIST = \ | |
73 $(minori_icons_png) \ | |
74 $(top_srcdir)/rc/icons/README.md \ | |
75 $(minori_linux_rc) \ | |
76 $(minori_osx_rc) \ | |
77 $(minori_win32_rc) \ | |
78 $(minori_scripts) | |
79 | |
80 # OS-specific | |
81 | |
82 if BUILD_GLIB | |
83 | |
84 files_glib = src/sys/glib/dark_theme.cc | |
85 cflags_glib = $(GLIB_CFLAGS) | |
86 libs_glib = $(GLIB_LIBS) | |
87 | |
88 endif | |
25 | 89 |
26 if BUILD_WIN | 90 if BUILD_WIN |
27 | 91 |
28 minori_qtrc += $(top_srcdir)/rc/win32/dark/dark.qrc | 92 files_win = src/sys/win32/dark_theme.cc |
93 libs_win = -lole32 -luuid | |
94 ldflags_win = -mwindows | |
95 | |
96 # Add dark stylesheet to resources | |
97 qtrc_win = $(top_srcdir)/rc/win32/dark/dark.qrc | |
98 | |
99 if BUILD_WINDRES | |
100 | |
101 wrcflags_version = -DWRC_VERSION=0,`echo $(PACKAGE_VERSION) | @SED@ 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1,\2,\3/'` | |
102 | |
103 WRCFLAGS = --use-temp-file -I. -I$(srcdir) $(wrcflags_version) $(CPPFLAGS) | |
104 .rc.$(OBJEXT): | |
105 $(WINDRES) $(WRCFLAGS) -i $< -o $@ | |
106 files_windres=rc/win32/version.rc rc/win32/resource.rc | |
107 | |
108 endif # BUILD_WINDRES | |
109 | |
110 endif # BUILD_WIN | |
111 | |
112 if BUILD_OSX | |
113 | |
114 files_osx = src/sys/osx/dark_theme.cc src/sys/osx/permissions.cc | |
115 cflags_osx = -mmacosx-version-min=10.15 | |
116 libs_osx = -lobjc | |
117 ldflags_osx = -framework Foundation -framework AppKit | |
29 | 118 |
30 endif | 119 endif |
31 | |
32 rc/final_qrc.cc: $(minori_qtrc) | |
33 $(RCC) -o $@ $(minori_qtrc) | |
34 | 120 |
35 minori_qtheaders = \ | 121 minori_qtheaders = \ |
36 include/core/http.h \ | 122 include/core/http.h \ |
37 include/gui/dialog/about.h \ | 123 include/gui/dialog/about.h \ |
38 include/gui/dialog/information.h \ | 124 include/gui/dialog/information.h \ |
76 include/sys/glib/dark_theme.h \ | 162 include/sys/glib/dark_theme.h \ |
77 include/sys/osx/dark_theme.h \ | 163 include/sys/osx/dark_theme.h \ |
78 include/sys/osx/filesystem.h \ | 164 include/sys/osx/filesystem.h \ |
79 include/sys/win32/dark_theme.h \ | 165 include/sys/win32/dark_theme.h \ |
80 include/track/media.h \ | 166 include/track/media.h \ |
167 dep/json/json.hpp \ | |
168 dep/json/json_fwd.hpp \ | |
169 dep/mini/ini.h \ | |
170 dep/semver/semver.hpp \ | |
81 $(minori_qtheaders) | 171 $(minori_qtheaders) |
82 | |
83 minori_moc_sources = $(minori_qtheaders:.h=_moc.cc) | |
84 | |
85 if BUILD_GLIB | |
86 files_glib = src/sys/glib/dark_theme.cc | |
87 cflags_glib = $(GLIB_CFLAGS) | |
88 libs_glib = $(GLIB_LIBS) | |
89 endif | |
90 | |
91 if BUILD_WIN | |
92 files_win = src/sys/win32/dark_theme.cc | |
93 libs_win = -lole32 -luuid | |
94 ldflags_win = -mwindows | |
95 | |
96 if BUILD_WINDRES | |
97 | |
98 wrcflags_version = -DWRC_VERSION=0,`echo $(PACKAGE_VERSION) | @SED@ 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1,\2,\3/'` | |
99 | |
100 WRCFLAGS = --use-temp-file -I. -I$(srcdir) $(wrcflags_version) $(CPPFLAGS) | |
101 .rc.$(OBJEXT): | |
102 $(WINDRES) $(WRCFLAGS) -i $< -o $@ | |
103 files_windres=rc/win32/version.rc rc/win32/resource.rc | |
104 endif # BUILD_WINDRES | |
105 | |
106 endif # BUILD_WIN | |
107 | |
108 if BUILD_OSX | |
109 files_osx = src/sys/osx/dark_theme.cc src/sys/osx/filesystem.cc src/sys/osx/permissions.cc | |
110 cflags_osx = -mmacosx-version-min=10.15 | |
111 libs_osx = -lobjc | |
112 ldflags_osx = -framework Foundation -framework AppKit | |
113 endif | |
114 | 172 |
115 minori_SOURCES = \ | 173 minori_SOURCES = \ |
116 src/core/anime_db.cc \ | 174 src/core/anime_db.cc \ |
117 src/core/anime.cc \ | 175 src/core/anime.cc \ |
118 src/core/config.cc \ | 176 src/core/config.cc \ |
155 src/track/media.cc \ | 213 src/track/media.cc \ |
156 src/main.cc \ | 214 src/main.cc \ |
157 $(files_osx) \ | 215 $(files_osx) \ |
158 $(files_glib) \ | 216 $(files_glib) \ |
159 $(files_win) \ | 217 $(files_win) \ |
160 $(files_windres) | 218 $(files_windres) \ |
161 | 219 $(minori_locale_ts) \ |
162 nodist_minori_SOURCES = \ | 220 $(minori_qtrc) \ |
221 $(minori_locale_qm) \ | |
163 $(minori_moc_sources) \ | 222 $(minori_moc_sources) \ |
223 rc/locale/translations.qrc \ | |
164 rc/final_qrc.cc | 224 rc/final_qrc.cc |
225 | |
226 minori_moc_sources = $(minori_qtheaders:.h=_moc.cc) | |
165 | 227 |
166 minori_includes = \ | 228 minori_includes = \ |
167 -I$(top_srcdir)/include \ | 229 -I$(top_srcdir)/include \ |
168 -I$(top_srcdir)/dep/animia/include \ | 230 -I$(top_srcdir)/dep/animia/include \ |
169 -I$(top_srcdir)/dep/pugixml/src \ | 231 -I$(top_srcdir)/dep/pugixml/src \ |
170 -I$(top_srcdir)/dep/anitomy \ | 232 -I$(top_srcdir)/dep/anitomy \ |
171 -I$(top_srcdir)/dep | 233 -I$(top_srcdir)/dep |
172 | 234 |
173 minori_CPPFLAGS = $(QT_CPPFLAGS) $(LIBCURL_CPPFLAGS) $(minori_includes) | 235 minori_CPPFLAGS = $(QT_CPPFLAGS) $(LIBCURL_CPPFLAGS) $(minori_includes) |
174 minori_CXXFLAGS = $(cflags_osx) $(cflags_glib) $(cflags_win) | 236 minori_CXXFLAGS = $(QT_CXXFLAGS) $(cflags_osx) $(cflags_glib) $(cflags_win) |
175 minori_LDFLAGS = $(QT_LDFLAGS) $(ldflags_osx) $(ldflags_win) | 237 minori_LDFLAGS = $(QT_LDFLAGS) $(ldflags_osx) $(ldflags_win) |
176 | 238 |
177 minori_DEPENDENCIES = dep/pugixml/libpugixml.la dep/animia/libanimia.la dep/anitomy/libanitomy.la | 239 minori_DEPENDENCIES = dep/pugixml/libpugixml.la dep/animia/libanimia.la dep/anitomy/libanitomy.la |
178 minori_LDADD = $(libs_glib) $(LIBCURL) $(QT_LIBS) $(libs_osx) $(libs_win) $(minori_DEPENDENCIES) | 240 minori_LDADD = $(libs_glib) $(LIBCURL) $(QT_LIBS) $(libs_osx) $(libs_win) $(minori_DEPENDENCIES) |
179 | 241 |
242 # Build only one qrc, otherwise we get a ton of | |
243 # weird linking errors | |
244 rc/final_qrc.cc: $(minori_qtrc) | |
245 $(RCC) -o $@ $(minori_qtrc) | |
246 | |
180 .h_moc.cc: | 247 .h_moc.cc: |
181 $(MKDIR_P) -- `dirname $@` | 248 $(MKDIR_P) -- $$(dirname $@) |
182 $(MOC) -o $@ $(minori_includes) $< | 249 $(MOC) -o $@ $(minori_includes) $< |
250 | |
251 .ts.qm: | |
252 $(MKDIR_P) $$(dirname $@); \ | |
253 $(LRELEASE) $< -qm $@ | |
183 | 254 |
184 SUFFIXES = .h _moc.cc .ts .qm | 255 SUFFIXES = .h _moc.cc .ts .qm |
185 SUBDIRS = $(subdirs) | 256 SUBDIRS = $(subdirs) |
186 ACLOCAL_AMFLAGS = -I m4 | 257 ACLOCAL_AMFLAGS = -I m4 |