-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathMakefile
51 lines (38 loc) · 1.86 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
LIBFLAGS=-L/opt/vc/lib -lbrcmEGL -lbrcmGLESv2 -ljpeg
INCLUDEFLAGS=-I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -fPIC
FONTLIB=/usr/share/fonts/truetype/ttf-dejavu
FONTFILES=DejaVuSans.inc DejaVuSansMono.inc DejaVuSerif.inc
all: font2openvg fonts library
libshapes.o: libshapes.c shapes.h fontinfo.h fonts
gcc -O2 -Wall $(INCLUDEFLAGS) -c libshapes.c
gopenvg: openvg.go
go install .
oglinit.o: oglinit.c
gcc -O2 -Wall $(INCLUDEFLAGS) -c oglinit.c
font2openvg: fontutil/font2openvg.cpp
g++ -I/usr/include/freetype2 fontutil/font2openvg.cpp -o font2openvg -lfreetype
fonts: $(FONTFILES)
DejaVuSans.inc: font2openvg $(FONTLIB)/DejaVuSans.ttf
./font2openvg $(FONTLIB)/DejaVuSans.ttf DejaVuSans.inc DejaVuSans
DejaVuSerif.inc: font2openvg $(FONTLIB)/DejaVuSerif.ttf
./font2openvg $(FONTLIB)/DejaVuSerif.ttf DejaVuSerif.inc DejaVuSerif
DejaVuSansMono.inc: font2openvg $(FONTLIB)/DejaVuSansMono.ttf
./font2openvg $(FONTLIB)/DejaVuSansMono.ttf DejaVuSansMono.inc DejaVuSansMono
clean:
rm -f *.o *.inc *.so font2openvg *.c~ *.h~
indent -linux -c 60 -brf -l 132 libshapes.c oglinit.c shapes.h fontinfo.h
library: oglinit.o libshapes.o
gcc $(LIBFLAGS) -shared -o libshapes.so oglinit.o libshapes.o
install:
install -m 755 -p font2openvg /usr/bin/
install -m 755 -p libshapes.so /usr/lib/libshapes.so.1.0.0
strip --strip-unneeded /usr/lib/libshapes.so.1.0.0
ln -f -s /usr/lib/libshapes.so.1.0.0 /usr/lib/libshapes.so
ln -f -s /usr/lib/libshapes.so.1.0.0 /usr/lib/libshapes.so.1
ln -f -s /usr/lib/libshapes.so.1.0.0 /usr/lib/libshapes.so.1.0
install -m 644 -p shapes.h /usr/include/
install -m 644 -p fontinfo.h /usr/include/
uninstall:
rm -f /usr/bin/font2openvg
rm -f /usr/lib/libshapes.so.1.0.0 /usr/lib/libshapes.so.1.0 /usr/lib/libshapes.so.1 /usr/lib/libshapes.so
rm -f /usr/include/shapes.h /usr/include/fontinfo.h