Mercurial
comparison mrjunejune/BUILD @ 173:827c6ac504cd hg-web
Merged in default here.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 19 Jan 2026 18:59:10 -0800 |
| parents | 295ac2e5ec00 |
| children | fed99fc04e12 8c74204fd362 |
comparison
equal
deleted
inserted
replaced
| 151:c033667da5f9 | 173:827c6ac504cd |
|---|---|
| 2 load("@rules_cc//cc:cc_library.bzl", "cc_library") | 2 load("@rules_cc//cc:cc_library.bzl", "cc_library") |
| 3 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle") | 3 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle") |
| 4 | 4 |
| 5 # Files | 5 # Files |
| 6 move_files_into_dir( | 6 move_files_into_dir( |
| 7 name = "compiled_ts_games", | 7 name = "react_pages", |
| 8 srcs = [ | 8 srcs = [ |
| 9 "//react_games:games" | 9 "//react_games:games" |
| 10 ], | 10 ], |
| 11 dest = "src/games", | 11 dest = "src/games", |
| 12 ) | 12 ) |
| 13 | 13 |
| 14 move_files_into_dir( | 14 move_files_into_dir( |
| 15 name = "compiled_ts", | 15 name = "shared_js_non_public", |
| 16 srcs = [ | 16 srcs = [ |
| 17 "//markdown_converter:markdown_to_html", | 17 "//markdown_converter:markdown_to_html", |
| 18 ], | 18 ], |
| 19 dest = "src", | 19 dest = "src", |
| 20 ) | 20 ) |
| 21 | 21 |
| 22 move_files_into_dir( | |
| 23 name = "shared_js_file", | |
| 24 srcs = [ | |
| 25 "//third_party/highlight:js", | |
| 26 ], | |
| 27 dest = "src/public/highlight", | |
| 28 ) | |
| 29 | |
| 22 filegroup( | 30 filegroup( |
| 23 name = "src_files", | 31 name = "src_files", |
| 24 srcs = glob(["src/**"]) + [":compiled_ts", ":compiled_ts_games"], | 32 srcs = glob(["src/**"]) + [":react_pages", ":shared_js_non_public", "shared_js_file"], |
| 25 visibility = ["//mrjunejune/test:__pkg__"], | 33 visibility = ["//mrjunejune/test:__pkg__"], |
| 26 ) | 34 ) |
| 27 | 35 |
| 28 # Server binary | 36 # Server binary |
| 29 cc_binary( | 37 cc_binary( |
| 30 name = "mrjunejune_server", | 38 name = "mrjunejune_server", |
| 31 srcs = ["main.c"], | 39 srcs = ["main.c"], |
| 32 deps = ["//seobeo:seobeo_tcp_server_ws"], | 40 deps = [ |
| 41 "//seobeo:seobeo_tcp_server_ws", | |
| 42 "//markdown_converter:markdown_to_html_c", | |
| 43 ], | |
| 33 data = [":src_files"], | 44 data = [":src_files"], |
| 34 visibility = ["//mrjunejune/test:__pkg__"], | 45 visibility = ["//mrjunejune/test:__pkg__"], |
| 35 ) | 46 ) |
| 36 | 47 |
| 37 # Debug build with verbose logging | 48 # Debug build with verbose logging |
| 38 cc_binary( | 49 cc_binary( |
| 39 name = "mrjunejune_server_debug", | 50 name = "mrjunejune_server_debug", |
| 40 srcs = ["main.c"], | 51 srcs = ["main.c"], |
| 41 deps = ["//seobeo:seobeo_tcp_server_ws_debug"], | 52 deps = [ |
| 53 "//seobeo:seobeo_tcp_server_ws_debug", | |
| 54 "//markdown_converter:markdown_to_html_c" | |
| 55 ], | |
| 56 data = [":src_files"], | |
| 57 ) | |
| 58 | |
| 59 # Run this to create html files | |
| 60 cc_binary( | |
| 61 name = "create_html_from_md", | |
| 62 srcs = ["create_html_from_md.c"], | |
| 63 deps = [ | |
| 64 "//markdown_converter:markdown_to_html_c", | |
| 65 "//dowa:dowa" | |
| 66 ], | |
| 42 data = [":src_files"], | 67 data = [":src_files"], |
| 43 ) | 68 ) |
| 44 | 69 |
| 45 # Release bundle | 70 # Release bundle |
| 46 bundle( | 71 bundle( |
| 50 | 75 |
| 51 bundle( | 76 bundle( |
| 52 name = "mrjunejune_server_debug_bundle", | 77 name = "mrjunejune_server_debug_bundle", |
| 53 binary = ":mrjunejune_server_debug", | 78 binary = ":mrjunejune_server_debug", |
| 54 ) | 79 ) |
| 55 | |
| 56 # Experimenting with python to see if I can call it as ffi. | |
| 57 # load("@rules_python//python:py_binary.bzl", "py_binary") | |
| 58 # This was to use python ffi, but w/e | |
| 59 # cc_library( | |
| 60 # name = "mrjunejune_server_lib", | |
| 61 # srcs = ["server_entry.c"], | |
| 62 # deps = ["//seobeo:seobeo_server"], | |
| 63 # linkstatic = False, | |
| 64 # visibility = ["//visibility:public"], | |
| 65 # ) | |
| 66 | |
| 67 # py_binary( | |
| 68 # name = "python_server", | |
| 69 # srcs = ["python_server.py"], | |
| 70 # deps = [ | |
| 71 # ":mrjunejune_server_lib", | |
| 72 # "@pip_deps//:cffi", | |
| 73 # ], | |
| 74 # data = [":mrjunejune_server_lib"], | |
| 75 # ) | |
| 76 | |
| 77 |