diff --git a/Makefile b/Makefile index 70e2836..1ee9395 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +PROJECT = example CFLAGS += -Wall -Wextra -pedantic -Werror -std=c23 SOURCES = $(wildcard *.c) @@ -5,7 +6,7 @@ OBJECTS = $(SOURCES:.c=.o) DEPENDS = $(SOURCES:.c=.d) DEPFLAGS = -MMD -MP -example: $(OBJECTS) +$(PROJECT): $(OBJECTS) $(CC) $(OBJECTS) -o $@ %.o: %.c @@ -13,7 +14,9 @@ example: $(OBJECTS) -include $(DEPENDS) -.PHONY: clean +.PHONY: clean all + +all: $(PROJECT) clean: - rm -f example $(OBJECTS) $(DEPENDS) + rm -f $(PROJECT) $(OBJECTS) $(DEPENDS)