]> git.xonotic.org Git - xonotic/mediasource.git/blob - fonts/xolonium/Makefile
Update Xolonium font sources to version 2.0
[xonotic/mediasource.git] / fonts / xolonium / Makefile
1 .PHONY: all dist clean clean-dist
2
3 # Tools
4 SHELL     = /bin/sh
5 FONTFORGE = fontforge
6
7 # Xolonium
8 FONTS   = Xolonium-Regular Xolonium-Bold
9 VERSION = 2.0
10
11 # Directories
12 VPATH       = $(DIR_SRC)
13 DIR_SRC     = src
14 DIR_SCRIPTS = scripts
15 DIR_OTF     = otf
16 DIR_DIST    = xolonium-fonts-$(VERSION)
17
18 # Files
19 FILES_MISC = ChangeLog COPYING COVERAGE CREDITS Makefile README
20 FILES_SFD  = $(foreach font, $(FONTS), $(DIR_SRC)/$(font).sfd)
21 FILES_OTF  = $(foreach font, $(FONTS), $(DIR_OTF)/$(font).otf)
22 FILES_FEA  = $(DIR_SRC)/Xolonium-Regular-kern.fea
23 SCRIPT_OTF = $(DIR_SCRIPTS)/generate-otf.ff
24
25
26 all: $(FILES_OTF)
27
28
29 $(DIR_OTF)/Xolonium-Regular.otf: Xolonium-Regular.sfd Xolonium-Regular-kern.fea
30         install -d $(dir $@)
31         $(FONTFORGE) -script $(SCRIPT_OTF) $+ $@
32
33
34 $(DIR_OTF)/Xolonium-Bold.otf: Xolonium-Bold.sfd Xolonium-Regular-kern.fea
35         install -d $(dir $@)
36         $(FONTFORGE) -script $(SCRIPT_OTF) $+ $@
37
38
39 dist: all clean-dist
40         install -d $(DIR_DIST)/$(DIR_SRC)
41         install -d $(DIR_DIST)/$(DIR_OTF)
42         install -d $(DIR_DIST)/$(DIR_SCRIPTS)
43
44         install -t $(DIR_DIST)                $(FILES_MISC)
45         install -t $(DIR_DIST)/$(DIR_SRC)     $(FILES_SFD) $(FILES_FEA)
46         install -t $(DIR_DIST)/$(DIR_OTF)     $(FILES_OTF)
47         install -t $(DIR_DIST)/$(DIR_SCRIPTS) $(SCRIPT_OTF)
48
49         zip -9r $(DIR_DIST).zip $(DIR_DIST)
50
51
52 clean: clean-dist
53
54
55 clean-dist:
56         rm -rf -- $(DIR_DIST)*