Cleaning up build-config.sh
This commit is contained in:
parent
75e72875ff
commit
6ae690691c
|
@ -204,42 +204,6 @@ RELEASE_FLAGS=(
|
|||
"-O2" # Optimization level 2 (clang equivalent to -O3 for performance)
|
||||
)
|
||||
|
||||
# =============================================================================
|
||||
# File Lists (from 4ed_build.cpp)
|
||||
# =============================================================================
|
||||
|
||||
# Platform layer files
|
||||
PLATFORM_FILES_WINDOWS=("platform_win32/win32_4ed.cpp")
|
||||
PLATFORM_FILES_LINUX=("platform_linux/linux_4ed.cpp")
|
||||
PLATFORM_FILES_MACOS=("platform_mac/mac_4ed.mm")
|
||||
|
||||
# Custom layer default target
|
||||
DEFAULT_CUSTOM_TARGET="$CUSTOM_DIR/4coder_default_bindings.cpp"
|
||||
|
||||
# =============================================================================
|
||||
# Build Defines
|
||||
# =============================================================================
|
||||
|
||||
# Function to get defines from flags (equivalent to get_defines_from_flags in 4ed_build.cpp)
|
||||
get_defines_from_flags() {
|
||||
local flags=$1
|
||||
local defines=()
|
||||
|
||||
if (( flags & FLAG_SHIP )); then
|
||||
defines+=("-DSHIP_MODE")
|
||||
fi
|
||||
|
||||
if (( flags & FLAG_INTERNAL )); then
|
||||
defines+=("-DFRED_INTERNAL")
|
||||
fi
|
||||
|
||||
if (( flags & FLAG_SUPER )); then
|
||||
defines+=("-DFRED_SUPER")
|
||||
fi
|
||||
|
||||
echo "${defines[@]}"
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Build Outputs
|
||||
# =============================================================================
|
||||
|
@ -258,51 +222,3 @@ SHARED_LIB_MACOS="4ed_app.so"
|
|||
CUSTOM_LIB_WINDOWS="custom_4coder.dll"
|
||||
CUSTOM_LIB_LINUX="custom_4coder.so"
|
||||
CUSTOM_LIB_MACOS="custom_4coder.so"
|
||||
|
||||
# =============================================================================
|
||||
# Utility Functions
|
||||
# =============================================================================
|
||||
|
||||
# Get platform-specific settings
|
||||
get_platform_settings() {
|
||||
local platform=$1
|
||||
case $platform in
|
||||
"windows"|"win32")
|
||||
echo "PLATFORM_WINDOWS"
|
||||
;;
|
||||
"linux")
|
||||
echo "PLATFORM_LINUX"
|
||||
;;
|
||||
"macos"|"mac")
|
||||
echo "PLATFORM_MAC"
|
||||
;;
|
||||
*)
|
||||
echo "UNKNOWN_PLATFORM"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get architecture-specific settings
|
||||
get_arch_settings() {
|
||||
local arch=$1
|
||||
case $arch in
|
||||
"x64"|"x86_64")
|
||||
echo "ARCH_X64"
|
||||
;;
|
||||
"x86"|"i386")
|
||||
echo "ARCH_X86"
|
||||
;;
|
||||
*)
|
||||
echo "UNKNOWN_ARCH"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Check if flag is set
|
||||
has_flag() {
|
||||
local flags=$1
|
||||
local flag=$2
|
||||
(( flags & flag ))
|
||||
}
|
Loading…
Reference in New Issue