GNUmakefile: updated make recipes

This commit is contained in:
Emma Tebibyte 2023-12-25 19:00:17 -07:00
parent a675386fe3
commit 10647a01fd
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -15,9 +15,12 @@
.PHONY: test
PREFIX=/usr/local
CC=cc
CFLAGS=-O3 -Lbuild/lib
RUSTC=rustc
RUSTCFLAGS=-C opt-level=z -C codegen-units=1 -C panic=abort -C lto=y -C strip=symbols
ifeq ($(CC), gcc)
CFLAGS=-O3 -s -Wl,-z,noseparate-code,-z,nosectionheader -flto \
@ -53,7 +56,7 @@ test: build
tests/posix-compat.sh
false: src/false.rs build_dir
$(RUSTC) -o build/bin/false src/false.rs
$(RUSTC) $(RUSTCFLAGS) -o build/bin/false src/false.rs
intcmp: src/intcmp.c build_dir
$(CC) $(CFLAGS) -o build/bin/intcmp src/intcmp.c
@ -67,8 +70,8 @@ str: src/str.c build_dir
strcmp: src/strcmp.c build_dir
$(CC) $(CFLAGS) -o build/bin/strcmp src/strcmp.c
true: src/true.c build_dir
$(CC) $(CFLAGS) -o build/bin/true src/true.c
true: src/true.rs build_dir
$(RUSTC) $(RUSTCFLAGS) -o build/bin/true src/true.rs
libfileis: src/libfileis.c src/libfileis.h build_dir
$(CC) $(CFLAGS) -c -fPIC -o build/o/libfileis.o src/libfileis.c