From 7d7b49a66848151fd952fe5d2625b5534c23b1aa Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 19 Oct 2024 20:00:25 +0200 Subject: [PATCH] n --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b54efad..542de1e 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ # Compiler to use CC ?= gcc -CFLAGS = -Wall -Wextra -std=gnu17 -I include -lelf +CFLAGS = -Wall -Wextra -std=gnu17 -I include +LDFLAGS = -lelf # Directory for build outputs -BUILD_DIR := build-$(uname -i) +BUILD_DIR := build # Name of the output program PROGRAM_NAME ?= criscv @@ -32,7 +33,7 @@ debug: $(TARGET) # Rule to link object files into the final executable $(TARGET): $(OBJS) | $(BUILD_DIR) - $(CC) $(CFLAGS) $^ -o $@ + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) du -b $(TARGET) # Size of the executable in bytes # Rule to compile source files into object files