summaryrefslogtreecommitdiff
path: root/base/build.sh
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-04-28 22:19:43 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-04-28 22:19:43 +0200
commite08b851c79ae9a7fc0a2066e49110dc7fb426bce (patch)
treec8458daee7201983903cf04413ff9a6072084028 /base/build.sh
parentc40f7421d8c1ccbe008dbd2191c6642625ae4b83 (diff)
reverted rewrite of ppu, optimized what functions should be forced inline, gained ~2.5% performance
Diffstat (limited to 'base/build.sh')
-rwxr-xr-xbase/build.sh77
1 files changed, 0 insertions, 77 deletions
diff --git a/base/build.sh b/base/build.sh
deleted file mode 100755
index e237c16..0000000
--- a/base/build.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-export PATH="$(git rev-parse --show-toplevel)/bin:$PATH"
-
-# Project name
-PROJECT_NAME="base"
-
-# Base configuration common to all builds
-CFLAGS="-mavx2 -mtune=native -std=gnu11 "
-CFLAGS+="-msse4.1 -mfunction-return=keep -mindirect-branch=keep "
-CFLAGS+="-fwrapv -ffast-math -fno-trapping-math -fwhole-program "
-CFLAGS+="-fno-stack-protector -fno-PIE -no-pie -fno-strict-aliasing -ffunction-sections -fdata-sections "
-CFLAGS+="-U_FORTIFY_SOURCE "
-CFLAGS+="-Wall -Wextra "
-CFLAGS+="-Wno-unused-parameter -Wno-sign-compare -Wno-trigraphs -Wno-maybe-uninitialized "
-CFLAGS+="-Wno-unused-variable -Wno-unused-const-variable -Wno-unused-function "
-
-LDFLAGS="-Wl,--gc-sections "
-
-# Base include paths
-INCLUDE_PATHS="-I../include -I../base -I../.."
-
-# Linux-specific includes and libraries
-LINUX_INCLUDE="-I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2"
-LINUX_LIBS="-lpipewire-0.3 -lXi -lX11 -lGL -lm -ldl -pthread"
-
-# Windows-specific includes and libraries
-WINDOWS_INCLUDE=""
-WINDOWS_LIBS="-lwinmm -lksuser -lole32 -lmmdevapi -lavrt -lgdi32 -lopengl32 -luuid"
-
-# Determine build type
-BUILD_TYPE=$1
-if [ -z "$BUILD_TYPE" ]; then
- BUILD_TYPE="normal"
-fi
-
-case "$BUILD_TYPE" in
- "normal")
- CFLAGS+=" -g -O2 -DDEBUG_INTERNAL"
- ;;
- "debug")
- CFLAGS+=" -g -O0"
- LDFLAGS+=" -fno-pie -no-pie"
- ;;
- "release")
- CFLAGS+=" -s -O2"
- ;;
- *)
- echo "Unknown build type: $BUILD_TYPE"
- exit 1
- ;;
-esac
-
-# Make sure shaders are up to date
-#shader2h 330 vertex_shader vertex_shader.glsl data/vertex_shader.h
-#shader2h 330 fragment_shader shader.h fragment_shader.glsl data/fragment_shader.h
-
-# Stop on first error
-set -e
-
-# Common compile commands
-gcc_cmd="gcc $CFLAGS ${PROJECT_NAME}.c -o ${PROJECT_NAME} $INCLUDE_PATHS $LDFLAGS"
-#mingw_cmd="x86_64-w64-mingw32-gcc $CFLAGS ${PROJECT_NAME}.c -o ${PROJECT_NAME}.exe -mwindows $INCLUDE_PATHS $LDFLAGS"
-
-# Run Linux and Windows builds in parallel
-(
-# ctime -begin .${PROJECT_NAME}_linux
- $gcc_cmd $LINUX_INCLUDE $LINUX_LIBS
-# ctime -end .${PROJECT_NAME}_linux $?
-) &
-
-#(
-# ctime -begin .${PROJECT_NAME}_windows
-# $mingw_cmd $WINDOWS_INCLUDE $WINDOWS_LIBS
-# ctime -end .${PROJECT_NAME}_windows $?
-#) &
-wait
-