Debug print macro and makefile changes related to asm/size

This commit is contained in:
Imbus 2024-06-30 20:31:52 +02:00
parent ec6cc83bd1
commit d5922a0091
2 changed files with 23 additions and 8 deletions

View file

@ -10,6 +10,9 @@ ifeq ($(RELEASE), 1)
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
else
CFLAGS += -g -O0 -std=c99 -march=native -mtune=native
CFLAGS += -DDEBUG
endif
# Include debug flags
@ -29,7 +32,6 @@ all: $(OBJECTS)
%.s: %.c $(C_HEADERS)
@echo "CC $<"
@$(CC) $(CFLAGS) -S -masm=intel $<
wc -l $@
driver: $(OBJECTS)
@$(CC) $(CFLAGS) $^ -o $@
@ -40,7 +42,9 @@ run: driver
clean:
rm -f $(OBJECTS) $(ASMS) driver
asm: $(ASMS)
asm: $(ASMS) $(OBJECTS)
wc -l $(ASMS)
size $(OBJECTS)
format:
clang-format -i $(C_SOURCES) $(C_HEADERS)