From 05cfeb2bdae967bcf98ae890aeaf3bcda867c1a6 Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Wed, 20 Dec 2023 00:07:57 +0600 Subject: [PATCH] build script --- build.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 8316f13..8fd723c 100644 --- a/build.sh +++ b/build.sh @@ -1,6 +1,16 @@ #!/bin/bash set -eo pipefail + +OUT_FILE="out/FusionCalculator.c" +BIN_FILE="bin/FusionCalculator.exe" +WARNINGS="-Wall -Wno-unused-value -Wno-unused-function -Wno-unused-variable -Wno-discarded-qualifiers" +INCLUDES="$(pkg-config --cflags glib-2.0)" +COMPILER_ARGS="-O0 -g" +LINKER_ARGS="$(pkg-config --libs glib-2.0)" + rm -rf out bin mkdir out bin -fut -l c -o out/FusionCalculator.c src/*.fu -gcc -Wall -Wno-unused-value -Wno-unused-function -O0 -g out/FusionCalculator.c -o bin/FusionCalculator.exe $(pkg-config --cflags glib-2.0) $(pkg-config --libs glib-2.0) + +fut -l c -o "$OUT_FILE" src/*.fu + +gcc $WARNINGS $COMPILER_ARGS "$OUT_FILE" -o "$BIN_FILE" $INCLUDES $LINKER_ARGS