Made project name adjustable
This commit is contained in:
parent
652828c29d
commit
c75ed48cc6
9
Makefile
9
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user