forked from bonsai/harakit
GNUmakefile: updated make recipes
This commit is contained in:
parent
a675386fe3
commit
10647a01fd
@ -15,9 +15,12 @@
|
|||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-O3 -Lbuild/lib
|
CFLAGS=-O3 -Lbuild/lib
|
||||||
|
|
||||||
RUSTC=rustc
|
RUSTC=rustc
|
||||||
|
RUSTCFLAGS=-C opt-level=z -C codegen-units=1 -C panic=abort -C lto=y -C strip=symbols
|
||||||
|
|
||||||
ifeq ($(CC), gcc)
|
ifeq ($(CC), gcc)
|
||||||
CFLAGS=-O3 -s -Wl,-z,noseparate-code,-z,nosectionheader -flto \
|
CFLAGS=-O3 -s -Wl,-z,noseparate-code,-z,nosectionheader -flto \
|
||||||
@ -53,7 +56,7 @@ test: build
|
|||||||
tests/posix-compat.sh
|
tests/posix-compat.sh
|
||||||
|
|
||||||
false: src/false.rs build_dir
|
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
|
intcmp: src/intcmp.c build_dir
|
||||||
$(CC) $(CFLAGS) -o build/bin/intcmp src/intcmp.c
|
$(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
|
strcmp: src/strcmp.c build_dir
|
||||||
$(CC) $(CFLAGS) -o build/bin/strcmp src/strcmp.c
|
$(CC) $(CFLAGS) -o build/bin/strcmp src/strcmp.c
|
||||||
|
|
||||||
true: src/true.c build_dir
|
true: src/true.rs build_dir
|
||||||
$(CC) $(CFLAGS) -o build/bin/true src/true.c
|
$(RUSTC) $(RUSTCFLAGS) -o build/bin/true src/true.rs
|
||||||
|
|
||||||
libfileis: src/libfileis.c src/libfileis.h build_dir
|
libfileis: src/libfileis.c src/libfileis.h build_dir
|
||||||
$(CC) $(CFLAGS) -c -fPIC -o build/o/libfileis.o src/libfileis.c
|
$(CC) $(CFLAGS) -c -fPIC -o build/o/libfileis.o src/libfileis.c
|
||||||
|
Loading…
Reference in New Issue
Block a user