parent
66f304fc81
commit
23e861ad54
1 changed files with 2 additions and 3 deletions
5
Makefile
5
Makefile
|
@ -1,8 +1,7 @@
|
||||||
# Compiler to use
|
# Compiler to use
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
|
|
||||||
CFLAGS = -Wall -Wextra -std=gnu23 -I include
|
CFLAGS = -Wall -Wextra -std=gnu23 -I include -lelf
|
||||||
LDFLAGS = -lelf
|
|
||||||
|
|
||||||
# Directory for build outputs
|
# Directory for build outputs
|
||||||
BUILD_DIR := build
|
BUILD_DIR := build
|
||||||
|
@ -33,7 +32,7 @@ debug: $(TARGET)
|
||||||
|
|
||||||
# Rule to link object files into the final executable
|
# Rule to link object files into the final executable
|
||||||
$(TARGET): $(OBJS) | $(BUILD_DIR)
|
$(TARGET): $(OBJS) | $(BUILD_DIR)
|
||||||
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
|
$(CC) $(CFLAGS) $^ -o $@
|
||||||
du -b $(TARGET) # Size of the executable in bytes
|
du -b $(TARGET) # Size of the executable in bytes
|
||||||
|
|
||||||
# Rule to compile source files into object files
|
# Rule to compile source files into object files
|
||||||
|
|
Loading…
Reference in a new issue