added font fetch to Makefile
authorNathan Wagner <nw@hydaspes.if.org>
Tue, 7 Apr 2015 20:18:00 +0000 (20:18 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Tue, 7 Apr 2015 20:18:00 +0000 (20:18 +0000)
sim/Makefile

index 9230ef94addc5b9d92f8ed5b9c9a2a65f04cd0c3..a15ef3d5d7020f659a06914437282771b4aa9a7f 100644 (file)
@@ -2,6 +2,8 @@ CFLAGS=-Wall -Wno-format -I/opt/local/include -Ihexagon
 LDFLAGS=-L/opt/local/lib -Lhexagon
 LIBS=-lgsl -lhexagon -lm -lgslcblas
 
+FONT ?= SourceCodePro-Light.ttf
+
 all: sim hexverts
 
 sim.o: | hexagon.h
@@ -9,6 +11,12 @@ sim.o: | hexagon.h
 sim: africa.o sim.o climate.o map.o variate.o | variate.h hexagon/libhexagon.a
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
 
+mkimage: | $(FONT)
+
+SourceCodePro-Light.ttf:
+       curl -L https://github.com/adobe-fonts/source-code-pro/archive/1.017R.tar.gz \
+               | tar -xzf - --no-anchored --strip-components=2 SourceCodePro-Light.ttf
+
 hexverts: hexverts.o | hexagon/libhexagon.a
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lhexagon -lm