semos/Makefile

24 lines
341 B
Makefile
Raw Normal View History

2024-04-02 16:21:48 +01:00
OUTPUT = semos
CFLAGS = -std=c17 -Wall -Wextra -Wpedantic -Wconversion -pedantic -pedantic-errors
CFILES = \
main.c \
OBJECT_FILES = $(patsubst %.c,%.o,$(CFILES))
HEADER_FILES = $(wildcard *.h)
$(OUTPUT): $(OBJECT_FILES)
gcc -o $@ $^
%.o: %.c $(HEADER_FILES)
gcc -c -o $@ $(CFLAGS) $<
.PHONY: clean
clean:
rm -rf *.o $(OUTPUT)