commit 57d1c93243ccc1ab9587685ccc88163ed1713a6a
parent e819f0c62b4cbf6e13e768d28b60140109cb8e13
Author: bsandro <email@bsandro.tech>
Date: Sun, 7 Dec 2025 22:00:00 +0200
Makefile optimization
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,14 +1,15 @@
.SUFFIXES:
MAKEFLAGS+=-rR
-CFLAGS=-O3 -std=c99 -Werror -Wall -Wextra -ffast-math -flto -I.
+CFLAGS=-O3 -std=c99 -Werror -Wall -Wextra -ffast-math -I.
UNAME:=$(shell uname -m)
ifeq ($(UNAME),riscv64)
CFLAGS+=-mtune=sifive-u74
else ifeq ($(UNAME),Power Macintosh)
-CFLAGS+=-mtune=native
+CFLAGS+=-mtune=native -flto
else
-CFLAGS+=-march=native
+CFLAGS+=-march=native -flto
endif
+
LDFLAGS=-lc -lm
ifneq ($(shell which clang),)