--- compile/ninja/macos.ninja.orig	2025-12-21 22:40:00
+++ compile/ninja/macos.ninja	2025-12-21 22:41:00
@@ -2,30 +2,31 @@
 builddir = build/macos
 bin = $builddir/bin
 obj = $builddir/obj
-cc = clang
+cc = __MACPORTS_CC__
+cxx = __MACPORTS_CXX__
 ar = ar
 luamake = luamake
 rule c_source_bee
-  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-    -fvisibility=hidden -mmacosx-version-min=10.15 -Itools/lua54 -DNDEBUG $
-    -Wunguarded-availability -o $out -c $in
+  command = $cc -MMD -MT $out -MF $out.d -std=c11 __MACPORTS_CPPFLAGS__ __MACPORTS_CFLAGS__ $
+    -Itools/lua54 -DNDEBUG $
+    -o $out -c $in
   description = Compile C   $out
   deps = gcc
   depfile = $out.d
 build $obj/source_bee/lua-seri.obj: c_source_bee $
     bee.lua/3rd/lua-seri/lua-seri.c
 rule cxx_source_bee
-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-    -fvisibility=hidden -mmacosx-version-min=10.15 -DNDEBUG $
-    -Wunguarded-availability -o $out -c $in
+  command = $cxx -MMD -MT $out -MF $out.d -std=c++17 __MACPORTS_CPPFLAGS__ __MACPORTS_CXXFLAGS__ $
+    -DNDEBUG $
+    -o $out -c $in
   description = Compile C++ $out
   deps = gcc
   depfile = $out.d
 build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
 rule cxx_source_bee_1
-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-    -fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua -DNDEBUG $
-    -Wunguarded-availability -o $out -c $in
+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 __MACPORTS_CPPFLAGS__ __MACPORTS_CXXFLAGS__ $
+    -Ibee.lua -DNDEBUG $
+    -o $out -c $in
   description = Compile C++ $out
   deps = gcc
   depfile = $out.d
@@ -58,9 +59,9 @@
 build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
     bee.lua/bee/utility/path_helper.cpp
 rule cxx_source_bee_2
-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-    -fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua -Itools/lua54 $
-    -DBEE_STATIC -DNDEBUG -Wunguarded-availability -o $out -c $in
+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 __MACPORTS_CPPFLAGS__ __MACPORTS_CXXFLAGS__ $
+    -Ibee.lua -Itools/lua54 $
+    -DBEE_STATIC -DNDEBUG -o $out -c $in
   description = Compile C++ $out
   deps = gcc
   depfile = $out.d
@@ -83,26 +84,26 @@
 build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
     bee.lua/binding/lua_time.cpp
 rule c_source_lua
-  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-    -fvisibility=hidden -mmacosx-version-min=10.15 -DNDEBUG $
-    -Wunguarded-availability -o $out -c $in
+  command = $cc -MMD -MT $out -MF $out.d __MACPORTS_CPPFLAGS__ __MACPORTS_CXXFLAGS__ $
+    -DNDEBUG $
+    -o $out -c $in
   description = Compile C   $out
   deps = gcc
   depfile = $out.d
 build $obj/source_lua/utf8_crt.obj: c_source_lua bee.lua/3rd/lua/utf8_crt.c
 rule c_source_lua_1
-  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-    -mmacosx-version-min=10.15 -DMAKE_LIB -DLUA_USE_MACOSX -DNDEBUG $
-    -Wunguarded-availability -o $out -c $in
+  command = $cc -MMD -MT $out -MF $out.d __MACPORTS_CPPFLAGS__ __MACPORTS_CXXFLAGS__ $
+    -DMAKE_LIB -DLUA_USE_MACOSX -DNDEBUG $
+    -o $out -c $in
   description = Compile C   $out
   deps = gcc
   depfile = $out.d
 build $obj/source_lua/linit.obj: c_source_lua_1 bee.lua/3rd/lua/linit.c
 build $obj/source_lua/onelua.obj: c_source_lua_1 bee.lua/3rd/lua/onelua.c
 rule cxx_source_bootstrap
-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-    -fvisibility=hidden -mmacosx-version-min=10.15 -Ibee.lua/3rd/lua $
-    -Ibee.lua -DLUA_USE_MACOSX -DNDEBUG -Wunguarded-availability -o $out -c $
+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 __MACPORTS_CPPFLAGS__ __MACPORTS_CXXFLAGS__ $
+    -Ibee.lua/3rd/lua $
+    -Ibee.lua -DLUA_USE_MACOSX -DNDEBUG -o $out -c $
     $in
   description = Compile C++ $out
   deps = gcc

