From e20a743605d7d2025899b21e7757fa039b055173 Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Mon, 7 Aug 2023 22:59:21 -0500 Subject: [PATCH] Delete build scripts in favor of parent orca scripts --- .gitignore | 1 + build.bat | 14 -------- build.sh | 98 ------------------------------------------------------ 3 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 build.bat delete mode 100755 build.sh diff --git a/.gitignore b/.gitignore index 1a924e6..1544a0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store *.dSYM bin +build *.metallib *.pdb diff --git a/build.bat b/build.bat deleted file mode 100644 index 58984af..0000000 --- a/build.bat +++ /dev/null @@ -1,14 +0,0 @@ - -@echo off -setlocal EnableDelayedExpansion - -if not exist bin mkdir bin - -set glsl_shaders=src\glsl_shaders\common.glsl src\glsl_shaders\blit_vertex.glsl src\glsl_shaders\blit_fragment.glsl src\glsl_shaders\path_setup.glsl src\glsl_shaders\segment_setup.glsl src\glsl_shaders\backprop.glsl src\glsl_shaders\merge.glsl src\glsl_shaders\raster.glsl src\glsl_shaders\balance_workgroups.glsl - -call python3 scripts\embed_text.py %glsl_shaders% --prefix=glsl_ --output src\glsl_shaders.h - -set INCLUDES=/I src /I src/util /I src/platform /I ext /I ext/angle_headers -set LIBS=user32.lib opengl32.lib gdi32.lib shcore.lib delayimp.lib dwmapi.lib comctl32.lib ole32.lib shell32.lib shlwapi.lib /LIBPATH:./bin libEGL.dll.lib libGLESv2.dll.lib /DELAYLOAD:libEGL.dll /DELAYLOAD:libGLESv2.dll - -cl /we4013 /Zi /Zc:preprocessor /DMP_BUILD_DLL /std:c11 /experimental:c11atomics %INCLUDES% src/milepost.c /Fo:bin/milepost.o /LD /link /MANIFEST:EMBED /MANIFESTINPUT:src/win32_manifest.xml %LIBS% /OUT:bin/milepost.dll /IMPLIB:bin/milepost.dll.lib diff --git a/build.sh b/build.sh deleted file mode 100755 index a8b61bc..0000000 --- a/build.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -DEBUG_FLAGS="-g -DDEBUG -DLOG_COMPILE_DEBUG" -#DEBUG_FLAGS="-O3" - -#-------------------------------------------------------------- -# set target -#-------------------------------------------------------------- - -target="${1:-}" -if [ -z $target ] ; then - target='lib' -fi - -shaderFlagParam="${2:-}" -#-------------------------------------------------------------- -# Detect OS and set environment variables accordingly -#-------------------------------------------------------------- -OS=$(uname -s) - -if [ $OS = "Darwin" ] ; then - #echo "Target '$target' for macOS" - CC=clang - CXX=clang++ - DYLIB_SUFFIX='dylib' - SYS_LIBS='' - FLAGS="-mmacos-version-min=10.15.4 -maes" - CFLAGS="-std=c11" - SDKDIR=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk - LDFLAGS="-L$SDKDIR/usr/lib -F$SDKDIR/System/Library/Frameworks/" - -elif [ $OS = "Linux" ] ; then - echo "Error: Linux is not supported yet" - exit -1 -else - echo "Error: Unsupported OS $OS" - exit -1 -fi - -#-------------------------------------------------------------- -# Set paths -#-------------------------------------------------------------- -BINDIR="./bin" -SRCDIR="./src" -EXTDIR="./ext" -RESDIR="./resources" -INCLUDES="-I$SRCDIR -I$SRCDIR/util -I$SRCDIR/platform -I$EXTDIR -I$EXTDIR/angle_headers" - -#-------------------------------------------------------------- -# Build -#-------------------------------------------------------------- - -if [ ! \( -e bin \) ] ; then - mkdir ./bin -fi - -if [ ! \( -e resources \) ] ; then - mkdir ./resources -fi - - -if [ $target = 'lib' ] ; then - - # compile metal shader - xcrun -sdk macosx metal $shaderFlagParam -fno-fast-math -c -o $BINDIR/mtl_renderer.air $SRCDIR/mtl_renderer.metal - xcrun -sdk macosx metallib -o $BINDIR/mtl_renderer.metallib $BINDIR/mtl_renderer.air - - # compile milepost. We use one compilation unit for all C code, and one compilation - # unit for all ObjectiveC code - $CC $DEBUG_FLAGS -c -o $BINDIR/milepost_c.o $CFLAGS $FLAGS $INCLUDES $SRCDIR/milepost.c - $CC $DEBUG_FLAGS -c -o $BINDIR/milepost_objc.o $FLAGS $INCLUDES $SRCDIR/milepost.m - - # build dynamic library - ld $LDFLAGS -dylib -o $BINDIR/libmilepost.dylib $BINDIR/milepost_c.o $BINDIR/milepost_objc.o -L$BINDIR -lc -framework Carbon -framework Cocoa -framework Metal -framework QuartzCore -weak-lEGL -weak-lGLESv2 - - # change dependent libs path to @rpath. - install_name_tool -change "./libEGL.dylib" '@rpath/libEGL.dylib' $BINDIR/libmilepost.dylib - install_name_tool -change "./libGLESv2.dylib" '@rpath/libGLESv2.dylib' $BINDIR/libmilepost.dylib - - # add executable path to rpath. Client executable can still add its own rpaths if needed, e.g. @executable_path/libs/ etc. - install_name_tool -id "@rpath/libmilepost.dylib" $BINDIR/libmilepost.dylib - -else - # additional targets - if [ $target = 'test' ] ; then - pushd examples/test_app - ./build.sh - popd - - elif [ $target = 'clean' ] ; then - rm -r ./bin - else - echo "unrecognized target $target" - exit -1 - fi -fi