add local -march=native compilation option

This commit is contained in:
NunoSempere 2024-02-11 19:00:04 +01:00
parent e3d5757e2a
commit bddfb5bfc8

View File

@ -11,6 +11,7 @@ CC=gcc # gcc: more options. Also I don't know whether tcc has error messages/deb
## other alternatives; clang, zig cc ## other alternatives; clang, zig cc
WARNINGS=-Wall 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 ## Main file
SRC=rose.c SRC=rose.c
@ -72,6 +73,10 @@ build: $(SRC) $(PLUGINS) $(CONFIG)
GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/ GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
$(CC) $(WARNINGS) $(OPTIMIZED) $(DEBUG) $(INCS) $(PLUGINS) $(SRC) -o rose $(LIBS) $(ADBLOCK) $(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: lint:
clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.0'` -o rose `pkg-config --libs 'webkit2gtk-4.0'` clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.0'` -o rose `pkg-config --libs 'webkit2gtk-4.0'`