aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2024-02-11 19:00:04 +0100
committerNunoSempere <nuno.sempere@protonmail.com>2024-02-11 19:00:04 +0100
commitbddfb5bfc874ec03f241eb5c1414becb72ae06ad (patch)
treef04f99af10df7f2482b797cc5c9e831868e6b283
parente3d5757e2ad79915fef7c67065d71138d79893f6 (diff)
add local -march=native compilation option
-rw-r--r--makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/makefile b/makefile
index cf62c1e..4413e59 100644
--- a/makefile
+++ b/makefile
@@ -10,7 +10,8 @@ CC=gcc # gcc: more options. Also I don't know whether tcc has error messages/deb
## CC=tcc # tcc: much faster compilation
## other alternatives; clang, zig cc
WARNINGS=-Wall
-OPTIMIZED=-O3 #-Ofast
+OPTIMIZED=-O3 #-Ofast
+LOCAL=-march=native # binary will not be compatible with other computers, but may be much faster
## Main file
SRC=rose.c
@@ -72,6 +73,10 @@ build: $(SRC) $(PLUGINS) $(CONFIG)
GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
$(CC) $(WARNINGS) $(OPTIMIZED) $(DEBUG) $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
+local: $(SRC) $(PLUGINS) $(CONFIG)
+ GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
+ $(CC) $(WARNINGS) $(OPTIMIZED) $(LOCAL) $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
+
lint:
clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.0'` -o rose `pkg-config --libs 'webkit2gtk-4.0'`