forked from joncampbell123/dosbox-x
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.am
112 lines (100 loc) · 5.54 KB
/
Makefile.am
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Main Makefile for DOSBox
EXTRA_DIST = autogen.sh
SUBDIRS = src include
.PHONY: dosbox-x.app
dosbox-x.app: src/dosbox-x contrib/macos/dosbox.icns
rm -Rfv dosbox-x.app
mkdir dosbox-x.app
mkdir dosbox-x.app/Contents
mkdir dosbox-x.app/Contents/MacOS
mkdir dosbox-x.app/Contents/Resources
cp -v contrib/macos/dosbox-x.plist dosbox-x.app/Contents/Info.plist
cp -v contrib/macos/dosbox-x.pkginfo dosbox-x.app/Contents/PkgInfo
cp -v contrib/macos/dosbox.icns dosbox-x.app/Contents/Resources/DosBox.icns
cp -v contrib/fonts/FREECG98.BMP dosbox-x.app/Contents/Resources/freecg98.bmp
cp -v src/dosbox-x dosbox-x.app/Contents/MacOS/DosBox
# this is where it gets ugly
otool -L dosbox-x.app/Contents/MacOS/DosBox | grep -E '/usr/local/lib|/usr/local/opt/ffmpeg/lib' | while read X; do Y=`echo "$$X" | sed -E '/^ +/s///' | cut -d ' ' -f 1`; \
dylib=`basename $$Y`; \
cp -v $$Y dosbox-x.app/Contents/MacOS/; \
install_name_tool -change $$Y @executable_path/$$dylib dosbox-x.app/Contents/MacOS/DosBox; \
done
# and the libs too
for pass in 1 2 3 4 5; do \
for dolib in dosbox-x.app/Contents/MacOS/*.dylib; do \
otool -L "$$dolib" | grep '/usr/local/lib' | while read X; do Y=`echo "$$X" | sed -E '/^ +/s///' | cut -d ' ' -f 1`; \
dylib=`basename $$Y`; \
cp -vn $$Y dosbox-x.app/Contents/MacOS/; \
echo "$$Y"; \
install_name_tool -change $$Y @executable_path/$$dylib "$$dolib"; \
install_name_tool -id @executable_path/$$dylib "$$dolib"; \
done; \
done; \
done
contrib/macos/dosbox.icns: contrib/macos/dosbox-x.png
rm -Rfv src/dosbox.iconset
mkdir src/dosbox.iconset
sips -z 16 16 contrib/macos/dosbox-x.png --out src/dosbox.iconset/icon_16x16.png
sips -z 32 32 contrib/macos/dosbox-x.png --out src/dosbox.iconset/[email protected]
sips -z 32 32 contrib/macos/dosbox-x.png --out src/dosbox.iconset/icon_32x32.png
sips -z 128 128 contrib/macos/dosbox-x.png --out src/dosbox.iconset/icon_128x128.png
sips -z 256 256 contrib/macos/dosbox-x.png --out src/dosbox.iconset/icon_256x256.png
sips -z 512 512 contrib/macos/dosbox-x.png --out src/dosbox.iconset/icon_512x512.png
sips -z 1024 1024 contrib/macos/dosbox-x.png --out src/dosbox.iconset/icon_1024x1024.png
iconutil -c icns -o contrib/macos/dosbox.icns src/dosbox.iconset
rm -Rfv src/dosbox.iconset
dox:
rm -Rfv doxygen
doxygen
dox-site-update:
if [[ !( -d ../dosbox-x-gh-pages ) ]]; then git clone -b gh-pages https://github.com/joncampbell123/dosbox-x.git ../dosbox-x-gh-pages; fi
(cd ../dosbox-x-gh-pages && rm -Rfv doxygen)
cp -Rf doxygen ../dosbox-x-gh-pages/
(cd ../dosbox-x-gh-pages && git add doxygen/)
(cd ../dosbox-x-gh-pages && git commit doxygen/)
compat-site-update:
if [[ !( -d ../dosbox-x-gh-pages ) ]]; then git clone -b gh-pages https://github.com/joncampbell123/dosbox-x.git ../dosbox-x-gh-pages; fi
true # ----------
(cd /mnt/main/emu/demotest && ./make-compat-chart.pl)
cp /mnt/main/emu/demotest/compat-chart.html ../dosbox-x-gh-pages/demoscene-compat.html
true # ----------
(cd /mnt/main/emu/msdostest && ./make-compat-chart.pl)
cp /mnt/main/emu/msdostest/compat-chart.html ../dosbox-x-gh-pages/msdos-compat.html
true # ----------
(cd ../dosbox-x-gh-pages && git add demoscene-compat.html)
(cd ../dosbox-x-gh-pages && git add msdos-compat.html)
(cd ../dosbox-x-gh-pages && git commit -m 'more' {msdos,demoscene}-compat.html)
install: src/dosbox-x
mkdir -p $(DESTDIR)$(bindir)
install -m 755 src/dosbox-x $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(prefix)/share/dosbox-x/glshaders
install -m 644 $(srcdir)/CHANGELOG $(DESTDIR)$(prefix)/share/dosbox-x
install -m 644 $(srcdir)/contrib/fonts/FREECG98.BMP $(DESTDIR)$(prefix)/share/dosbox-x
install -m 644 $(srcdir)/dosbox-x.reference.conf $(DESTDIR)$(prefix)/share/dosbox-x
install -m 644 $(srcdir)/dosbox-x.reference.full.conf $(DESTDIR)$(prefix)/share/dosbox-x
install -m 644 $(srcdir)/contrib/glshaders/*.glsl $(DESTDIR)$(prefix)/share/dosbox-x/glshaders
mkdir -p $(DESTDIR)$(prefix)/share/icons/hicolor/scalable/apps
install -m 644 $(srcdir)/contrib/icons/dosbox-x.svg $(DESTDIR)$(prefix)/share/icons/hicolor/scalable/apps/dosbox-x.svg
mkdir -p $(DESTDIR)$(prefix)/share/applications
install -m 644 $(srcdir)/contrib/linux/com.dosbox_x.DOSBox-X.desktop $(DESTDIR)$(prefix)/share/applications
mkdir -p $(DESTDIR)$(prefix)/share/metainfo
install -m 644 $(srcdir)/contrib/linux/com.dosbox_x.DOSBox-X.metainfo.xml $(DESTDIR)$(prefix)/share/metainfo
mkdir -p $(DESTDIR)$(mandir)/man1
install -m 644 $(srcdir)/contrib/linux/dosbox-x.1 $(DESTDIR)$(mandir)/man1
-test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x
install_strip: src/dosbox-x install
install -m 755 -s src/dosbox-x $(DESTDIR)$(bindir)
-test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x
uninstall:
rm -f $(DESTDIR)$(bindir)/dosbox-x
rm -f $(DESTDIR)$(prefix)/share/dosbox-x/glshaders/*
rmdir $(DESTDIR)$(prefix)/share/dosbox-x/glshaders
rm -f $(DESTDIR)$(prefix)/share/dosbox-x/*
rmdir $(DESTDIR)$(prefix)/share/dosbox-x
rm -f $(DESTDIR)$(prefix)/share/icons/hicolor/48x48/apps/dosbox-x.png
rm -f $(DESTDIR)$(prefix)/share/icons/hicolor/scalable/apps/dosbox-x.svg
rm -f $(DESTDIR)$(prefix)/share/applications/dosbox-x.desktop
rm -f $(DESTDIR)$(prefix)/share/applications/com.dosbox_x.DOSBox-X.desktop
rm -f $(DESTDIR)$(prefix)/share/metainfo/dosbox-x.metainfo.xml
rm -f $(DESTDIR)$(prefix)/share/metainfo/com.dosbox_x.DOSBox-X.metainfo.xml
rm -f $(DESTDIR)$(mandir)/man1/dosbox-x.1