forked from lehitoskin/ivy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.osx
36 lines (26 loc) · 1.05 KB
/
Makefile.osx
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
DESTDIR ?= /Applications
MANDIR ?= /usr/local/share/man/man1
RACO ?= raco
RFLAGS ?= --vv --gui
MAIN = main.rkt
SOURCES = $(MAIN) base.rkt config.rkt db.rkt db-statistics.rkt embed.rkt error-log.rkt files.rkt frame.rkt meta-editor.rkt search-dialog.rkt search-results.rkt tag-browser.rkt thumbnails.rkt
IMAGES = img/ivy-logo-128px.png img/ivy-logo-256px.png img/ivy-logo-48px.png img/ivy-logo-64px.png img/ivy-logo-16px.png img/ivy-logo-32px.png img/ivy-logo-512px.png
MANPAGES = doc/ivy.1.bz2
all: ivy.app
ivy: ivy.app
ivy.app: $(SOURCES) Starter.icns
${RACO} exe $(RFLAGS) -o ivy $(MAIN)
cp Starter.icns ivy.app/Contents/Resources/
Starter.icns: mac.iconset
iconutil -c icns -o $@ $<
mac.iconset : $(IMAGES)
mkdir -p $@
@for f in $(IMAGES) ; do \
cp $$f $@/`echo $$f|sed 's/img\/ivy-logo-\([0-9]*\)px.png/icon_\1x\1.png/'` ; \
done
install: ivy.app $(MANPAGES)
cp -r -p ivy.app $(DESTDIR)/
ln -sf $(DESTDIR)/ivy.app/Contents/MacOS/ivy /usr/local/bin/ivy
install -m 0644 doc/ivy.1.bz2 $(MANDIR)/
clean:
rm -Rvf compiled ivy.app mac.iconset Starter.icns