annotate raylib_examples/raylib.bzl @ 22:947b81010aba

[Dowa & Seobeo] Updated so that Dowa hashmaps can use arena and not be broken. Split up web so taht it can handle different paths. Also fixes issues with hash collisions which was pain in the ass.
author June Park <parkjune1995@gmail.com>
date Tue, 07 Oct 2025 07:11:02 -0700
parents f33d9ff8b6e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
1 def raylib_binary(
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
2 name,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
3 srcs,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
4 deps = [],
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
5 deps_macos = [],
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
6 deps_linux = [],
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
7 linkopts_macos = [
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
8 "-framework CoreVideo",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
9 "-framework IOKit",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
10 "-framework Cocoa",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
11 "-framework GLUT",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
12 "-framework OpenGL",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
13 ],
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
14 linkopts_linux = [
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
15 "-lGL",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
16 "-lm",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
17 "-lpthread",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
18 "-ldl",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
19 "-lrt",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
20 "-lX11",
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
21 ]):
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
22 """
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
23 Raylib specific cross platform rules.
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
24
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
25 Args:
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
26 name: The logical name of the binary (alias).
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
27 srcs: List of source files (common).
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
28 deps: Mutual dependency.
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
29 deps_macos: Extra deps for macOS.
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
30 deps_linux: Extra deps for Linux.
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
31 linkopts_macos: Extra linkopts for macOS.
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
32 linkopts_linux: Extra linkopts for Linux.
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
33 """
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
34
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
35 macos_bin = name + "_macos"
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
36 linux_bin = name + "_linux"
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
37
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
38 native.cc_binary(
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
39 name = macos_bin,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
40 srcs = srcs,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
41 deps = deps + deps_macos,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
42 linkopts = linkopts_macos,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
43 )
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
44
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
45 native.cc_binary(
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
46 name = linux_bin,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
47 srcs = srcs,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
48 deps = deps + deps_linux,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
49 linkopts = linkopts_linux,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
50 )
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
51
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
52 native.alias(
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
53 name = name,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
54 actual = select({
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
55 "//config:macos": ":" + macos_bin,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
56 "//config:linux": ":" + linux_bin,
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
57 "//conditions:default": ":" + linux_bin, # fallback
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
58 }),
f33d9ff8b6e8 [Raylib] Added raylib linux to third party lib and added cross platform support.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
59 )