From e24b2f7904f67e9d7ebde822fc3b2c686f9d0128 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 23 Jun 2024 15:06:21 +0200 Subject: [PATCH] Bunch of options to make the machine code slick --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 727e859..e117a77 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,10 @@ CC = gcc CFLAGS = -Wall -Wextra -Werror -Wno-unused-parameter CFLAGS += -Wno-unused-variable -Wno-unused-function CFLAGS += -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-label +CFLAGS += -Wno-unused-result -Wno-unused-const-variable +CFLAGS += -fno-exceptions -fno-asynchronous-unwind-tables -fno-ident +CFLAGS += -fno-unwind-tables -fno-stack-protector -fno-plt -fno-pic +CFLAGS += -O3 -std=c99 -march=native -mtune=native -fomit-frame-pointer C_SOURCES = $(wildcard *.c) C_HEADERS = $(wildcard *.h) @@ -19,6 +23,7 @@ all: $(OBJECTS) %.s: %.c $(C_HEADERS) @echo "CC $<" @$(CC) $(CFLAGS) -S -masm=intel $< + wc -l $@ clean: rm -f $(OBJECTS) $(ASMS)