-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
64 lines (52 loc) · 1.49 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
PREFIX ?= /usr/local
TTF2EOT_BIN := ./support/ttf2eot/ttf2eot
TTFAUTOHINT_BIN := ./support/ttfautohint/frontend/ttfautohint
PLATFORM := $(shell uname)
support:
$(MAKE) $(TTF2EOT_BIN)
$(MAKE) $(TTFAUTOHINT_BIN)
# ttfautohint
# ttf2eot
support-install: support
cp $(TTFAUTOHINT_BIN) $(PREFIX)/bin
cp $(TTF2EOT_BIN) $(PREFIX)/bin
support-osx:
@if [[ $(PLATFORM) = "Darwin" ]]; then \
brew install ttf2eot ; \
brew install ttfautohint ; \
else \
echo "this target is only for OS X" >&2 ; \
exit 128 ; \
fi
$(TTF2EOT_BIN):
cd ./support/ttf2eot \
&& $(MAKE) ttf2eot
$(TTFAUTOHINT_BIN):
git submodule init support/ttfautohint
git submodule update support/ttfautohint
cd ./support/ttfautohint && \
git submodule init && \
git submodule update && \
./bootstrap ; \
./configure --with-qt=no --with-doc=no && make
dev-deps:
@if [[ $(PLATFORM) = "Darwin" ]]; then \
brew install python ; \
brew install fontforge ; \
sudo ln -s /opt/X11/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.6.dylib ; \
brew tap sampsyo/py ; \
brew install PyYAML ; \
brew install automake autoconf libtool ; \
pip -q install pystache argparse ; \
else \
if test 0 -ne `id -u` ; then \
echo "root privileges are required" >&2 ; \
exit 128 ; \
fi ; \
apt-get -qq install \
fontforge python python-fontforge libfreetype6-dev \
python-yaml python-pip \
build-essential autoconf automake libtool ; \
pip -q install pystache argparse ; \
fi
.PHONY: support