This repository has been archived by the owner on May 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
nanovg.setup
69 lines (58 loc) · 2.32 KB
/
nanovg.setup
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
65
66
67
68
69
;;; nanovg.setup -*- Scheme -*-
(use make)
(define current-version '1.0.3)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Config
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define standard-options '(-O3 -C -O3 -C -D_CRT_SECURE_NO_WARNINGS))
(define gl-client
(cond-expand
((or arm gles) "-Dgles -C -DGLES")
(else "")))
(define gl-compile-options
(cond-expand
(macosx "-FOpenGL")
(else "")))
(define gl-link-options
(cond-expand
(macosx "-framework OpenGL")
(windows "-lopengl32 -lglew32")
((or arm gles) "-lGLESv2")
(else "-lGL")))
(make
(("nanovg/src/nanovg.o" ("nanovg/src/nanovg.c")
(compile ,gl-compile-options -c -C -fPIC ,gl-client nanovg/src/nanovg.c))
("nanovg-gl2.import.so" ("nanovg.scm" "nanovg-gl2.scm")
(begin
(compile ,gl-link-options -s -d1 -J -Dnanovg-gl2 ,@standard-options ,gl-client nanovg-gl2.scm nanovg/src/nanovg.o)
(compile -s -d0 -Dnanovg-gl2 ,@standard-options nanovg-gl2.import.scm)))
("nanovg-gl3.import.so" ("nanovg.scm" "nanovg-gl3.scm")
(begin
(compile ,gl-link-options -s -d1 -J -Dnanovg-gl3 ,@standard-options ,gl-client nanovg-gl3.scm nanovg/src/nanovg.o)
(compile -s -d0 -Dnanovg-gl3 ,@standard-options nanovg-gl3.import.scm)))
("nanovg-gles2.import.so" ("nanovg.scm" "nanovg-gles2.scm")
(begin
(compile ,gl-link-options -s -d1 -J -Dnanovg-gles2 ,@standard-options ,gl-client nanovg-gles2.scm nanovg/src/nanovg.o)
(compile -s -d0 -Dnanovg-gles2 ,@standard-options nanovg-gles2.import.scm)))
("nanovg-gles3.import.so" ("nanovg.scm" "nanovg-gles3.scm")
(begin
(compile ,gl-link-options -s -d1 -J -Dnanovg-gles3 ,@standard-options ,gl-client nanovg-gles3.scm nanovg/src/nanovg.o)
(compile -s -d0 -Dnanovg-gles3 ,@standard-options nanovg-gles3.import.scm)))
("all" ("nanovg/src/nanovg.o" "nanovg-gl2.import.so" "nanovg-gl3.import.so" "nanovg-gles2.import.so" "nanovg-gles3.import.so")))
"all")
(install-extension
'nanovg-gl2
'("nanovg-gl2.so" "nanovg-gl2.import.so")
`((version ,current-version)))
(install-extension
'nanovg-gl3
'("nanovg-gl3.so" "nanovg-gl3.import.so")
`((version ,current-version)))
(install-extension
'nanovg-gles2
'("nanovg-gles2.so" "nanovg-gles2.import.so")
`((version ,current-version)))
(install-extension
'nanovg-gles3
'("nanovg-gles3.so" "nanovg-gles3.import.so")
`((version ,current-version)))