annotate third_party/raylib/raylib.bzl @ 276:b55c22cff335

Add interactive infinite canvas prototype
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 16:57:56 -0700
parents 94705b5986b3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
177
24fe8ff94056 Fixed few issues with current setup.
MrJuneJune <me@mrjunejune.com>
parents: 166
diff changeset
1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
24fe8ff94056 Fixed few issues with current setup.
MrJuneJune <me@mrjunejune.com>
parents: 166
diff changeset
2
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
3 def raylib_binary(
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
4 name,
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
5 srcs,
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
6 deps = [],
114
e2a73e64e8e6 [Postdog] Got history working.
June Park <parkjune1995@gmail.com>
parents: 71
diff changeset
7 data = [],
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
8 deps_macos = [],
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
9 deps_linux = [],
61
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
10 deps_windows = [],
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
11 linkopts_macos = [
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
12 "-framework CoreVideo",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
13 "-framework IOKit",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
14 "-framework Cocoa",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
15 "-framework GLUT",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
16 "-framework OpenGL",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
17 ],
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
18 linkopts_linux = [
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
19 "-lm",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
20 "-lpthread",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
21 "-ldl",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
22 "-lrt",
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
23 "-lX11",
58
ccb42d5bf8fd [PostDog] Somewhat working copy. That would use for testing.
June Park <parkjune1995@gmail.com>
parents: 26
diff changeset
24 ],
61
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
25 linkopts_windows = [
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
26 "/DEFAULTLIB:winmm.lib",
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
27 "/DEFAULTLIB:gdi32.lib",
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
28 "/DEFAULTLIB:opengl32.lib",
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
29 "/DEFAULTLIB:user32.lib",
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
30 "/DEFAULTLIB:shell32.lib",
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
31 ],
178
94705b5986b3 [ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents: 177
diff changeset
32 # I am not sure what these do lol
94705b5986b3 [ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents: 177
diff changeset
33 linkopts_wasm = [
276
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
34 "-sUSE_GLFW=3",
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
35 "-sMIN_WEBGL_VERSION=2",
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
36 "-sMAX_WEBGL_VERSION=2",
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
37 "-sALLOW_MEMORY_GROWTH",
178
94705b5986b3 [ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents: 177
diff changeset
38 ],
276
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
39 static = False,
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
40 defines = [],
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
41 tags = [],
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
42 visibility = None,
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
43 additional_linker_inputs = [],
58
ccb42d5bf8fd [PostDog] Somewhat working copy. That would use for testing.
June Park <parkjune1995@gmail.com>
parents: 26
diff changeset
44 ):
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
45 """
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
46 Raylib specific cross platform rules.
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
47 Args:
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
48 name: The logical name of the binary (alias).
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
49 srcs: List of source files (common).
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
50 deps: Mutual dependency.
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
51 deps_macos: Extra deps for macOS.
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
52 deps_linux: Extra deps for Linux.
61
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
53 deps_windows: Extra deps for Windows.
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
54 linkopts_macos: Extra linkopts for macOS.
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
55 linkopts_linux: Extra linkopts for Linux.
61
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
56 linkopts_windows: Extra linkopts for Windows.
9df5587cf23b [Color game] It can compile on windows now.
June Park <me@mrjunejune.com>
parents: 58
diff changeset
57 static: Make build executable static
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
58 """
177
24fe8ff94056 Fixed few issues with current setup.
MrJuneJune <me@mrjunejune.com>
parents: 166
diff changeset
59 cc_binary(
71
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
60 name = name,
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
61 srcs = srcs,
114
e2a73e64e8e6 [Postdog] Got history working.
June Park <parkjune1995@gmail.com>
parents: 71
diff changeset
62 data = data,
276
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
63 defines = defines + select({
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
64 "//config:macos": [],
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
65 "//config:linux": [],
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
66 "//config:windows": [],
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
67 "//conditions:default": ["PLATFORM_WEB"],
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
68 }),
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
69 additional_linker_inputs = additional_linker_inputs,
71
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
70 deps = deps + select({
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
71 "//config:macos": deps_macos,
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
72 "//config:linux": deps_linux,
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
73 "//config:windows": deps_windows,
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
74 "//conditions:default": [],
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
75 }),
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
76 linkopts = select({
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
77 "//config:macos": linkopts_macos,
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
78 "//config:linux": linkopts_linux,
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
79 "//config:windows": linkopts_windows,
178
94705b5986b3 [ThirdParty] Added WRK and luajit for load testing.
MrJuneJune <me@mrjunejune.com>
parents: 177
diff changeset
80 "//conditions:default": linkopts_wasm,
71
75de5903355c Giagantic changes that update Dowa library to be more align with stb style array and hashmap. Updated Seobeo to be caching on server side instead of file level caching. Deleted bunch of things I don't really use.
June Park <parkjune1995@gmail.com>
parents: 61
diff changeset
81 }),
58
ccb42d5bf8fd [PostDog] Somewhat working copy. That would use for testing.
June Park <parkjune1995@gmail.com>
parents: 26
diff changeset
82 linkstatic = static,
276
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
83 tags = tags,
b55c22cff335 Add interactive infinite canvas prototype
MrJuneJune <me@mrjunejune.com>
parents: 178
diff changeset
84 visibility = visibility,
26
a58a663dae68 [Sori] Making a simple game.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
85 )