aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--justfile20
2 files changed, 12 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 6ed4c85..a02831a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-/main.s
+/main*.s
/p4dcc*
/tests/tmp
diff --git a/justfile b/justfile
index 12eeb46..6e51901 100644
--- a/justfile
+++ b/justfile
@@ -2,16 +2,18 @@ CFLAGS := "-Wno-builtin-declaration-mismatch"
all: build
-build:
- gcc -g -O0 -o p4dcc main.c {{CFLAGS}}
-
-build2: build
- ./p4dcc < main.c > main.s
- gcc -Wl,-z,noexecstack -o p4dcc2 main.s
+build N="1":
+ #!/usr/bin/env bash
+ if [[ {{N}} = 1 ]]; then
+ gcc -g -O0 -o p4dcc main.c {{CFLAGS}}
+ else
+ ./p4dcc < main.c > main{{N}}.s
+ gcc -Wl,-z,noexecstack -o p4dcc{{N}} main{{N}}.s
+ fi
-build3: build2
- ./p4dcc2 < main.c > main.s
- gcc -Wl,-z,noexecstack -o p4cc3 main.s
+build N: build
+ ./p4dcc < main.c > main{{N}}.s
+ gcc -Wl,-z,noexecstack -o p4dcc{{N}} main{{N}}.s
test TESTCASE="all" $BIN="p4dcc": build
#!/usr/bin/env bash