Mercurial
comparison mrjunejune/BUILD @ 124:dbf14f84d51c
Refactor Seobeo and mrjunejune build files so it works.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Thu, 08 Jan 2026 07:31:32 -0800 |
| parents | 70401cf61e97 |
| children | f236c895604e |
comparison
equal
deleted
inserted
replaced
| 123:3f4ec30e42e0 | 124:dbf14f84d51c |
|---|---|
| 1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary") | 1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary") |
| 2 load("@rules_cc//cc:cc_library.bzl", "cc_library") | 2 load("@rules_cc//cc:cc_library.bzl", "cc_library") |
| 3 # load("@rules_python//python:py_binary.bzl", "py_binary") | |
| 4 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle") | 3 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle") |
| 5 | 4 |
| 5 # Files | |
| 6 move_files_into_dir( | 6 move_files_into_dir( |
| 7 name = "compiled_ts_games", | 7 name = "compiled_ts_games", |
| 8 srcs = [ | 8 srcs = [ |
| 9 "//react_games:games" | 9 "//react_games:games" |
| 10 ], | 10 ], |
| 23 filegroup( | 23 filegroup( |
| 24 name = "src_files", | 24 name = "src_files", |
| 25 srcs = glob(["src/**"]) + [":compiled_ts", ":compiled_ts_games"], | 25 srcs = glob(["src/**"]) + [":compiled_ts", ":compiled_ts_games"], |
| 26 ) | 26 ) |
| 27 | 27 |
| 28 # Server binary | |
| 28 cc_binary( | 29 cc_binary( |
| 29 name = "mrjunejune_server", | 30 name = "mrjunejune_server", |
| 30 srcs = ["main.c"], | 31 srcs = ["main.c"], |
| 31 deps = ["//seobeo:seobeo_server"], | 32 deps = ["//seobeo:seobeo_server"], |
| 32 data = [":src_files"], | 33 data = [":src_files"], |
| 33 ) | 34 ) |
| 34 | 35 |
| 35 cc_binary( | 36 cc_binary( |
| 36 name = "mrjunejune_server_dev", | 37 name = "mrjunejune_server_dev", |
| 37 srcs = ["main.c"], | 38 srcs = ["main.c"], |
| 38 deps = ["//seobeo:seobeo_server_dev"], | 39 deps = ["//seobeo:seobeo_server"], |
| 39 data = [":src_files"], | 40 data = [":src_files"], |
| 40 ) | 41 ) |
| 41 | 42 |
| 43 # Rlease bundle | |
| 42 bundle( | 44 bundle( |
| 43 name = "mrjunejune_server_bundle", | 45 name = "mrjunejune_server_bundle", |
| 44 binary = ":mrjunejune_server", | 46 binary = ":mrjunejune_server", |
| 45 ) | 47 ) |
| 46 | 48 |
| 47 bundle( | 49 bundle( |
| 48 name = "mrjunejune_server_dev_bundle", | 50 name = "mrjunejune_server_dev_bundle", |
| 49 binary = ":mrjunejune_server_dev", | 51 binary = ":mrjunejune_server_dev", |
| 50 ) | 52 ) |
| 51 | 53 |
| 54 # Tests | |
| 55 # TODO: Move this in a folder. | |
| 52 cc_test( | 56 cc_test( |
| 53 name = "integration_test", | 57 name = "integration_test", |
| 54 srcs = ["test/integration_test.c"], | 58 srcs = ["test/integration_test.c"], |
| 55 deps = ["//seobeo:seobeo_client"], | 59 deps = ["//seobeo:seobeo_min"], |
| 56 data = [ | 60 data = [ |
| 57 "//mrjunejune:mrjunejune_server", | 61 "//mrjunejune:mrjunejune_server", |
| 58 "//mrjunejune:src_files", | 62 "//mrjunejune:src_files", |
| 59 "//mrjunejune:test_snapshots", | 63 "//mrjunejune:test_snapshots", |
| 60 "//mrjunejune:test_files", | 64 "//mrjunejune:test_files", |
| 65 ) | 69 ) |
| 66 | 70 |
| 67 cc_binary( | 71 cc_binary( |
| 68 name = "create_snapshots", | 72 name = "create_snapshots", |
| 69 srcs = ["test/create_snapshots.c"], | 73 srcs = ["test/create_snapshots.c"], |
| 70 deps = ["//seobeo:seobeo_client"], | 74 deps = ["//seobeo:seobeo_tcp_client"], |
| 71 data = [ | 75 data = [ |
| 72 "//mrjunejune:mrjunejune_server", | 76 "//mrjunejune:mrjunejune_server", |
| 73 "//mrjunejune:src_files", | 77 "//mrjunejune:src_files", |
| 74 ], | 78 ], |
| 75 args = ["$(location //mrjunejune:mrjunejune_server)"], | 79 args = ["$(location //mrjunejune:mrjunejune_server)"], |
| 86 "test/shiba.webp", | 90 "test/shiba.webp", |
| 87 "test/test_avi.avi", | 91 "test/test_avi.avi", |
| 88 ], | 92 ], |
| 89 ) | 93 ) |
| 90 | 94 |
| 95 # Experimenting with python to see if I can call it as ffi. | |
| 96 # load("@rules_python//python:py_binary.bzl", "py_binary") | |
| 91 # This was to use python ffi, but w/e | 97 # This was to use python ffi, but w/e |
| 92 # cc_library( | 98 # cc_library( |
| 93 # name = "mrjunejune_server_lib", | 99 # name = "mrjunejune_server_lib", |
| 94 # srcs = ["server_entry.c"], | 100 # srcs = ["server_entry.c"], |
| 95 # deps = ["//seobeo:seobeo_server"], | 101 # deps = ["//seobeo:seobeo_server"], |