File: Makefile.am

package info (click to toggle)
lmarbles 1.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,604 kB
  • sloc: ansic: 5,515; sh: 3,029; makefile: 179
file content (75 lines) | stat: -rw-r--r-- 3,134 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
SUBDIRS = src

EXTRA_DIST = lmarbles.spec AUTHORS COPYING ChangeLog INSTALL README \
README-SDL.txt TODO LMarbles.prj lmarbles32.gif lmarbles48.gif \
lmarbles.desktop.in

desktopdir = $(datadir)/applications
desktop_DATA = lmarbles.desktop
icondir = $(datadir)/icons
icon_DATA = lmarbles48.gif

AUTOMAKE_OPTIONS = foreign

WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt TODO marbles.spec
WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll
WIN32_SYS_DLL = msvcrt.dll		  

lmarbles.desktop:
	@sed -e "s+Icon=+Icon=lmarbles+" \
	< lmarbles.desktop.in > lmarbles.desktop

win32text: $(WIN32_TEXT)
	@echo Converting text files for win32 installer
	@-rm -rf ./win32text
	@mkdir ./win32text
	@for textfile in $(WIN32_TEXT); do \
	  $(AWK) '{printf "%s\r\n",$$0}' $$textfile > ./win32text/$$textfile ; \
	done

win32-installer-script: @win32_inst_script@

@win32_inst_script@: win32text
	@echo Generating win32 installer script
	@echo "[Setup]" > $@
	@echo "AppName=@appname@" >> $@
	@echo "AppVerName=@appname@ $(VERSION)" >> $@
	@echo "AppPublisher=Michael Speck" >> $@
	@echo "AppPublisherURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
	@echo "AppSupportURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
	@echo "AppUpdatesURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
	@echo "DefaultDirName={pf}\\$(PACKAGE)" >> $@
	@echo "DefaultGroupName=@appname@" >> $@
	@echo "OutputDir=." >> $@
	@echo "Uninstallable=yes" >> $@
	@echo "AlwaysCreateUninstallIcon=yes" >> $@
	@echo "AdminPrivilegesRequired=1" >> $@
	@echo "[Tasks]" >> $@
	@echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
	@echo "[Files]" >> $@
	@(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do \
	  echo "Source: \"`pwd -W`\\$$file\";   DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; \
	done)
	@(cd win32dlls; for file in $(WIN32_SYS_DLL); do \
	  echo "Source: \"`pwd -W`\\$$file\";   DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; \
	done)
	@echo "Source: \"win32text\\*.*\";      DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; 
	@list='$(SUBDIRS)'; for subdir in $$list; do \
	  (cd $$subdir  \
           && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
        done
	@echo "[Icons]" >> $@
	@echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
	@echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\manual\\manual.html\"" >> $@
	@echo "Name: \"{userdesktop}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"; Tasks: \"desktopicon\"" >> $@
	@echo "[Run]" >> $@
	@echo "Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; Description: \"Launch @appname@\"; Flags: nowait postinstall skipifsilent" >> $@

	@$(AWK) '{printf "%s\r\n",$$0}' $@ > marbles.iss.w32
	@mv marbles.iss.w32 $@
	
win32-installer: win32-installer-script
	$(ISCC) installer.iss 	
	@-rm -rf win32text
	@mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
	@echo Self installer created: $(PACKAGE)-$(VERSION)-win32.exe