forked from janet-lang/jaylib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.janet
53 lines (42 loc) · 1.16 KB
/
project.janet
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
( declare-project
:name "jaylib"
:author "Calvin Rose <[email protected]>")
(def o (os/which))
(def cflags
(case o
:macos '["-Iraylib/src" "-ObjC"]
#default
'["-Iraylib/src"]))
(def lflags
(case o
:windows '[]
:macos '["-lpthread" "-framework" "Cocoa" "-framework" "CoreVideo" "-framework" "IOKit" "-framework" "OpenGL"]
:linux '["-lpthread" "-lX11"]
#default
'["-lpthread"]))
(declare-native
:name "jaylib"
:cflags cflags
:defines {"PLATFORM_DESKTOP" true}
:source ["src/main.c"
# raylib sources
"raylib/src/core.c"
"raylib/src/models.c"
"raylib/src/raudio.c"
"raylib/src/rglfw.c"
"raylib/src/shapes.c"
"raylib/src/text.c"
"raylib/src/textures.c"
"raylib/src/utils.c"]
:headers ["src/core.h"
"src/types.h"
"src/audio.h"
"src/gestures.h"
"src/text.h"
"src/image.h"
"src/shapes.h"
"src/3d.h"]
:lflags lflags)
# `jpm run repl` to run a repl with access to jaylib
(phony "repl" ["build"]
(os/execute ["janet" "-l" "build/jaylib"] :p))