aboutsummaryrefslogtreecommitdiffhomepage
path: root/justfile
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-23 17:41:23 +0900
committernsfisis <nsfisis@gmail.com>2025-08-23 17:41:23 +0900
commit8646e6f693fd935c6cb81e776a6c92a3fd093a33 (patch)
tree450b60115282243bf0567b495e9e85f0d56abba1 /justfile
parentd83647f390d2910547ada2854eee6189e8552cb8 (diff)
downloadducc-8646e6f693fd935c6cb81e776a6c92a3fd093a33.tar.gz
ducc-8646e6f693fd935c6cb81e776a6c92a3fd093a33.tar.zst
ducc-8646e6f693fd935c6cb81e776a6c92a3fd093a33.zip
feat: output executable using gcc
Diffstat (limited to 'justfile')
-rw-r--r--justfile16
1 files changed, 8 insertions, 8 deletions
diff --git a/justfile b/justfile
index 3011133..d6528a9 100644
--- a/justfile
+++ b/justfile
@@ -4,16 +4,16 @@ build N="1":
#!/usr/bin/env bash
set -e
if [[ {{N}} = 1 ]]; then
- gcc -g -O0 -o ducc main.c
+ cc=gcc
+ target=ducc
+ elif [[ {{N}} = 2 ]]; then
+ cc=./ducc
+ target=ducc{{N}}
else
- if [[ {{N}} = 2 ]]; then
- prev=""
- else
- prev=$(({{N}} - 1))
- fi
- "./ducc${prev}" main.c > main{{N}}.s
- gcc -s -o ducc{{N}} main{{N}}.s
+ cc="./ducc$(({{N}} - 1))"
+ target=ducc{{N}}
fi
+ "$cc" -g -O0 -o "$target" main.c
build-upto-5-gen:
just build 1