-
Notifications
You must be signed in to change notification settings - Fork 33
/
makefile
68 lines (51 loc) · 1.36 KB
/
makefile
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
.PHONY: help
help: makefile
@tail -n +4 makefile | grep ".PHONY"
.PHONY: test
test:
gcc cbits/test.c cbits/simplecv.c cbits/perspectivetransform.c -o test_bin && ./test_bin
stack test
Perspec.app: ~/.local/bin/perspec imagemagick
platypus \
--name Perspec \
--app-icon images/icon.icns \
--interface-type 'Text Window' \
--app-version 0.2.0.0-$$(date -u "+%Y-%m-%dT%H:%M") \
--author "Adrian Sieber" \
--bundled-file ~/.local/bin/perspec \
--bundled-file app-aux-files/Credits.html \
--bundled-file imagemagick \
--bundled-file scripts \
--bundle-identifier org.adrian.Perspec \
--droppable \
--optimize-nib \
--xml-property-lists \
--overwrite \
app-aux-files/perspec.sh \
$@
# For macOS
imagemagick:
curl -L \
https://download.imagemagick.org/ImageMagick/download/binaries/ImageMagick-x86_64-apple-darwin20.1.0.tar.gz \
-o imagemagick.tar.gz
tar -xzf imagemagick.tar.gz
rm -rf imagemagick
mv ImageMagick-7.* imagemagick
~/.local/bin/perspec: app source images/banner.bmp
stack install
.PHONY: perspec
perspec: ~/.local/bin/perspec
images/banner.bmp: images/banner.png
magick $< $@
.PHONY: install
install: Perspec.app
rm -rf /Applications/Perspec.app
cp -R Perspec.app /Applications/Perspec.app
.PHONY: clean
clean:
-rm -rf \
~/.local/bin/perspec \
.stack-work \
imagemagick \
imagemagick.tar.gz \
Perspec.app \