Debian Codegraph @

Makefile.am

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 ## Process this file with automake to produce Makefile.in
2 # $Id: Makefile.am,v 1.26 2007-09-15 18:02:36 ahuillet Exp $
3
4 ## make sure rebuilding uses the right aclocal-switches
5 include include.mk
6
7 # Initialize automake variables
8 ACLOCAL_AMFLAGS = -I m4
9 AM_MAKEFLAGS = CC="$(CC)" RANLIB=$(RANLIB) STRIP=$(STRIP)
10 AM_CFLAGS = @FD_CFLAGS@
11 AM_CPPFLAGS = @FD_CPPFLAGS@
12 AM_LDFLAGS = @FD_LDFLAGS@
13 LIBS = @FD_LIBS@ @LIBS@
14 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-dev-tools --enable-rtprof
15 PACKAGE_YEAR = $(shell date +'%Y')
16
17 if WIN32
18 WIN32_PREBUILD = win32
19 endif
20
21 if BUILD_LUA
22 MAYBE_EMBEDDED_LUA = externals/lua
23 endif
24
25 if BUILD_PO
26 MAYBE_BUILD_PO = po
27 endif
28
29 SUBDIRS = $(MAYBE_EMBEDDED_LUA) $(WIN32_PREBUILD) src tools doc $(MAYBE_BUILD_PO) pkgs
30
31 man_MANS = freedroidRPG.6
32 README_l10n = $(basename $(notdir $(wildcard $(top_srcdir)/README-*)))
33 dist_doc_DATA = README $(README_l10n) CONTRIBUTING.md NEWS
34
35 freedroid_data = data lua_modules
36
37 EXTRA_DIST = m4 externals/lua $(man_MANS) $(freedroid_data) ChangeLog INSTALL.freedroidRPG
38 CHECKFLAGS=env SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy
39
40 check:
41 $(CHECKFLAGS) ./src/freedroidRPG -nb text || exit 1
42 $(CHECKFLAGS) ./src/freedroidRPG -nb dialog || exit 2
43 $(CHECKFLAGS) ./src/freedroidRPG -nb loadship || exit 3
44 $(CHECKFLAGS) ./src/freedroidRPG -nb dynarray || exit 4
45 $(CHECKFLAGS) ./src/freedroidRPG -nb mapgen || exit 5
46 $(CHECKFLAGS) ./src/freedroidRPG -nb leveltest || exit 6
47 $(CHECKFLAGS) ./src/freedroidRPG -nb event || exit 7
48
49
50 dist-hook:
51 find $(distdir) -name ".git" | xargs rm -rf
52 find $(distdir) -name "*~" | xargs rm -f
53 find $(distdir) -name ".#*" | xargs rm -f
54 find $(distdir)/externals/lua -name "*.o" | xargs rm -f
55 find $(distdir)/externals/lua -name "*.a" | xargs rm -f
56 find $(distdir)/externals/lua -name "Makefile" | xargs rm -f
57
58 install-data-local:
59 @echo "Installing the data-files ..."
60 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
61 cd $(srcdir); \
62 for dir in $(freedroid_data) ; do \
63 find $${dir} -type d ! -path "*.git*" -exec echo $(DESTDIR)$(pkgdatadir)/{} \; | xargs $(mkinstalldirs) ; \
64 find $${dir} -type f ! -path "*.git*" -and ! -name "Makefile*" -and ! -name "*~" -and ! -name ".#*" -exec $(INSTALL_DATA) {} $(DESTDIR)$(pkgdatadir)/{} \; ; \
65 done
66 @echo "..done."
67
68 uninstall-local:
69 @echo "Removing data-files ..."
70 rm -rf $(DESTDIR)$(pkgdatadir)
71 rm -rf $(DESTDIR)$(docdir)
72 @echo "...done."
73
74 changelog:
75 @git log --pretty=tformat:"------------------------------------------------------------------------%n%h | %an | %ai%n%n%w(72)%s"
76
77 sign:
78 @echo "Generating signatures ..."
79 gpg --digest-algo SHA512 -o freedroidrpg-$(VERSION).tar.bz2.sig --detach-sign freedroidrpg-$(VERSION).tar.bz2
80 md5sum freedroidrpg-$(VERSION).tar.bz2 > freedroidrpg-$(VERSION).tar.bz2.md5
81
82 doc:
83 $(MAKE) -C doc $(AM_MAKEFLAGS) doc
84
85 ###
86 # Win32 specific stuff follows here
87 ###
88
89 # Fill the win_dir with all the stuff needed to create an installer
90
91 win_txts = COPYING AUTHORS README ChangeLog
92 win_dir = freedroidRPG.win32
93 win_app_prefix = freedroidRPG-$(VERSION)-win32-x86-64
94 dist-win32: src/freedroidRPG.exe
95 @if [ "x$(DLL_PATH)" = "x" ] ; then \
96 echo "DLL_PATH not defined. Aborting."; \
97 exit 1; \
98 fi
99 rm -rf $(win_dir)
100 mkdir -p $(win_dir)
101 rsync -ar --exclude='.git' --exclude='Makefile*' --exclude='*~' --exclude='.#*' data lua_modules locale $(win_dir)
102 cp src/freedroidRPG.exe $(win_dir)
103 for i in $(win_txts); do \
104 sed 's/$$/\r/' $$i > $(win_dir)/$$i.txt; \
105 done
106 perl win32/pkgApp.pl $(win_dir) freedroidRPG.exe $(DLL_PATH)
107 cp $(DLL_PATH)/SDL2.dll $(win_dir)
108 tar -czf $(win_app_prefix).app.tgz -C $(win_dir) --xform s:'./':: .
109
110 # Create a win32 installer
111
112 $(win_dir): dist-win32
113 package-win32: $(filter-out $(wildcard $(win_dir)), $(win_dir))
114 @if [ $$(file src/freedroidRPG.exe | grep " PE32+ " | grep -c "x86-64") -eq 0 ] ; then \
115 echo "src/freedroidRPG.exe is not a 64b windows exe. Aborting."; \
116 exit 1; \
117 fi
118 rm -f $(win_app_prefix).exe
119 rm -f freedroidRPG.nsi
120 win32/install_file_lists.py win32/freedroidRPG.nsi.in $(win_dir) > freedroidRPG.nsi
121 makensis -V1 -DPRODUCT_VERSION="$(VERSION)" -DSRC_DIR="${win_dir}" -DOUT_FILE="$(win_app_prefix).exe" freedroidRPG.nsi
122 rm -f freedroidRPG.nsi
123
124 ###
125 # MacOSX specific stuff follows here
126 ###
127
128 # Fill the macosx_dir with all the stuff needed to create a package
129
130 macosx_dir = freedroidRPG.app
131 dist-macosx: src/freedroidRPG
132 rm -rf $(macosx_dir)
133 mkdir -p $(macosx_dir)/Contents
134 mkdir -p $(macosx_dir)/Contents/MacOS
135 mkdir -p $(macosx_dir)/Contents/Resources
136 mkdir -p $(macosx_dir)/Contents/Frameworks
137 cp macosx/Icon.icns $(macosx_dir)/Contents/Resources/Icon.icns
138 cp src/freedroidRPG $(macosx_dir)/Contents/MacOS
139 sed -e "s/__#PROGNAME#__/$(PACKAGE_NAME)/" -e "s/__#VERSION#__/$(PACKAGE_VERSION)/" -e "s/__#YEAR#__/$(PACKAGE_YEAR)/" macosx/Info.plist.in > $(macosx_dir)/Contents/Info.plist
140 echo "APPL????" > $(macosx_dir)/Contents/PkgInfo
141 rsync -ar --exclude='.git' --exclude='Makefile*' --exclude='*~' --exclude='.#*' data lua_modules locale $(macosx_dir)/Contents
142 perl macosx/pkgApp.pl $(macosx_dir)/Contents MacOS/freedroidRPG Frameworks
143
144 ###
145 # AppImage specific stuff follows here
146 ###
147
148 appimage_topdir = $(abs_top_srcdir)/pkgs
149 appimage_dir = AppDir
150 appimage_path = $(appimage_topdir)/$(appimage_dir)
151 dist-appimage:
152 rm -rf $(appimage_path)
153 ${MAKE} clean
154 env DESTDIR=$(appimage_path) ${MAKE} install prefix=/usr datarootdir=/usr/share
155
156 $(appimage_path): dist-appimage
157 package-appimage: $(filter-out $(wildcard $(appimage_path)), $(appimage_path))
158 @cd $(appimage_topdir) ; \
159 rm -rf $(appimage_path)/usr/share/icons/HighContrast ; \
160 rm -f $(appimage_path)/usr/share/icons/hicolor/128x128/apps/freedroidrpg.png ; \
161 rm -f $(appimage_path)/usr/share/icons/hicolor/48x48/apps/freedroidrpg.png ; \
162 rm -f $(appimage_path)/usr/share/icons/hicolor/96x96/apps/freedroidrpg.png ; \
163 rm -f $(appimage_path)/usr/share/icons/hicolor/scalable/apps/freedroidrpg.svg ; \
164 OUTPUT=$(PACKAGE_NAME)-$(PACKAGE_VERSION)-x86_64.AppImage /usr/local/bin/linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
165
166 .PHONY: dist-image
167
168 ###
169 # L10N main build rules
170 ###
171
172 update-po: update-po-@USE_NLS@
173 update-po-no:
174 @echo "NLS is disabled. Nothing to do."
175 update-po-yes:
176 cd po && $(MAKE) $(AM_MAKEFLAGS) update-po
177
178 update-gmo: update-gmo-@USE_NLS@
179 update-gmo-no:
180 @echo "NLS is disabled. Nothing to do."
181 update-gmo-yes:
182 cd po && $(MAKE) $(AM_MAKEFLAGS) update-gmo
183
184 l10n-stats: l10n-stats-@USE_NLS@
185 l10n-stats-no:
186 @echo "NLS is disabled. Nothing to do."
187 l10n-stats-yes:
188 @cd po && $(MAKE) -s $(AM_MAKEFLAGS) l10n-stats
189
190 l10n-translators: l10n-translators-@USE_NLS@
191 l10n-translators-no:
192 @echo "NLS is disabled. Nothing to do."
193 l10n-translators-yes:
194 @cd po && $(MAKE) -s $(AM_MAKEFLAGS) l10n-translators
195
196 l10n-clean: l10n-clean-@USE_NLS@
197 l10n-clean-no:
198 @echo "NLS is disabled. Nothing to do."
199 l10n-clean-yes:
200 @cd po && $(MAKE) -s $(AM_MAKEFLAGS) l10n-clean
201
202 help:
203 @echo "Make targets:"
204 @echo " -----"
205 @echo " * all - Default compilation (same as 'make')"
206 @echo " * clean - Remove files modified/generated by build"
207 @echo " * check - Runs certain benchmarks"
208 @echo " * doc - Creates doxygen documentation"
209 @echo " * update-po - Update the translation files in po/"
210 @echo " * update-gmo - Compile the translation files"
211 @echo " * local-install - Install the compiled translation files into the local locale/"
212 @echo " * l10n-stats - Output localization statistics"
213 @echo " * l10n-translators - Output localization authors"
214 @echo " * list-all-authors - List all the authors mentioned in the git commits"
215 @echo " * list-new-authors - List the authors mentioned in the git commits since the latest git tag"
216 @echo " * cppcheck - Checks the code using cppcheck (static code analysation)"
217 @echo " * cppcheck-report - Checks the code using cppcheck and generates a html report"
218 @echo " * gource - Generate gource video from git log (requires git repository)"
219 @echo " * gource_ffmpeg - Generate gource video from git log and record using ffmpeg (requires git repository, ffmpeg and x264)"
220 @echo " * help - This output"
221
222 .PHONY: sign doc changelog help
223 .PHONY: update-po-no update-po-yes update-gmo-no update-gmo-yes local-install-no local-install-yes