add -march=native flag to C

This commit is contained in:
NunoSempere 2024-02-11 19:43:48 +01:00
parent 3fb6eb0c0e
commit 841e4eda90

View File

@ -25,6 +25,7 @@ DEBUG= #'-g'
STANDARD=-std=c99 STANDARD=-std=c99
WARNINGS=-Wall WARNINGS=-Wall
OPTIMIZED=-O3 #-O3 actually gives better performance than -Ofast, at least for this version OPTIMIZED=-O3 #-O3 actually gives better performance than -Ofast, at least for this version
LOCAL=-march=native
OPENMP=-fopenmp OPENMP=-fopenmp
## Formatter ## Formatter
@ -33,10 +34,10 @@ FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
## make build ## make build
build: $(SRC) build: $(SRC)
$(CC) $(OPTIMIZED) $(DEBUG) $(SRC) $(OPENMP) $(MATH) -o $(OUTPUT) $(CC) $(OPTIMIZED) $(DEBUG) $(SRC) $(LOCAL) $(OPENMP) $(MATH) -o $(OUTPUT)
static: static:
$(CC) $(OPTIMIZED) $(DEBUG) $(SRC) $(OPENMP) $(MATH) -o $(OUTPUT) $(CC) $(OPTIMIZED) $(DEBUG) $(SRC) $(LOCAL) $(OPENMP) $(MATH) -o $(OUTPUT)
format: $(SRC) format: $(SRC)
$(FORMATTER) $(SRC) $(FORMATTER) $(SRC)