Improve build scripts

This commit is contained in:
Charlie Malmqvist 2024-08-23 14:16:21 +02:00
parent 884d28add0
commit 9de955c84e
4 changed files with 9 additions and 31 deletions

View file

@ -1,8 +1,7 @@
@echo off
if exist build (
rmdir /s /q build
if not exist build (
mkdir build
)
mkdir build
pushd build

View file

@ -1,9 +1,5 @@
#!/bin/sh
if [ -d build ]; then
rm -r build
fi
CC=x86_64-w64-mingw32-gcc
CFLAGS="-g -O0 -std=c11 --static -D_CRT_SECURE_NO_WARNINGS
-Wextra -Wno-sign-compare -Wno-unused-parameter

View file

@ -1,18 +0,0 @@
@echo off
if exist build/dissassembly (
rmdir /s /q build
)
if not exist build (
mkdir build
)
pushd build
mkdir dissassembly
pushd dissassembly
clang -o cgame.asm ../../build.c -Ofast -std=c11 -D_CRT_SECURE_NO_WARNINGS -Wextra -Wno-incompatible-library-redeclaration -Wno-sign-compare -Wno-unused-parameter -Wno-builtin-requires-header -Wno-deprecated-declarations -finline-functions -ffast-math -fno-math-errno -funsafe-math-optimizations -freciprocal-math -ffinite-math-only -fassociative-math -fno-signed-zeros -fno-trapping-math -ftree-vectorize -fomit-frame-pointer -funroll-loops -fno-rtti -fno-exceptions -S -masm=intel
popd
popd

View file

@ -1,15 +1,16 @@
@echo off
if exist build (
rmdir /s /q build
if not exist build (
mkdir build
)
mkdir build
if not exist "build\release" (
mkdir build\release
)
pushd build
mkdir release
pushd release
clang -o cgame.exe ../../build.c -Ofast -DNDEBUG -std=c11 -D_CRT_SECURE_NO_WARNINGS -Wextra -Wno-incompatible-library-redeclaration -Wno-sign-compare -Wno-unused-parameter -Wno-builtin-requires-header -Wno-deprecated-declarations -lkernel32 -lgdi32 -luser32 -lruntimeobject -lwinmm -ld3d11 -ldxguid -ld3dcompiler -lshlwapi -lole32 -lavrt -lksuser -finline-functions -finline-hint-functions -ffast-math -fno-math-errno -funsafe-math-optimizations -freciprocal-math -ffinite-math-only -fassociative-math -fno-signed-zeros -fno-trapping-math -ftree-vectorize -fomit-frame-pointer -funroll-loops -fno-rtti -fno-exceptions
clang -o cgame.exe ../../build.c -Ofast -DNDEBUG -std=c11 -D_CRT_SECURE_NO_WARNINGS -Wextra -Wno-incompatible-library-redeclaration -Wno-sign-compare -Wno-unused-parameter -Wno-builtin-requires-header -Wno-deprecated-declarations -lkernel32 -lgdi32 -luser32 -lruntimeobject -lwinmm -ld3d11 -ldxguid -ld3dcompiler -lshlwapi -lole32 -lshcore -lavrt -lksuser -finline-functions -finline-hint-functions -ffast-math -fno-math-errno -funsafe-math-optimizations -freciprocal-math -ffinite-math-only -fassociative-math -fno-signed-zeros -fno-trapping-math -ftree-vectorize -fomit-frame-pointer -funroll-loops -fno-rtti -fno-exceptions
popd
popd