update
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,6 +1,6 @@
|
||||
# ----- Variables for customization -----
|
||||
CC = gcc # Compiler (you can change to clang if desired)
|
||||
CFLAGS = -g3 -Wall -Wextra -fsanitize=address,undefined # Standard flags + debugging & warnings
|
||||
CFLAGS = -g2 -Wall -Wextra #-fsanitize=address # Standard flags + debugging & warnings
|
||||
LDFLAGS = # Linker flags, if any
|
||||
|
||||
# ----- Automatic dependency tracking -----
|
||||
@@ -9,14 +9,14 @@ OBJS := $(SRCS:.c=.o) # Corresponding object files (.o)
|
||||
HDRS := $(SRCS:.c=.h)
|
||||
|
||||
# ----- Targets -----
|
||||
server: $(OBJS)
|
||||
$(CC) $(CFLAGS) $(OBJS) -o server $(LDFLAGS)
|
||||
server: $(OBJS)
|
||||
$(CC) $(CFLAGS) $(OBJS) -o server $(LDFLAGS)
|
||||
|
||||
# Create object files from source files
|
||||
%.o: %.c %.h
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# Phony target for cleaning
|
||||
# Phony target for cleaning
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(OBJS) server
|
||||
rm -f $(OBJS)
|
||||
|
||||
Reference in New Issue
Block a user