This commit is contained in:
Imbus 2024-06-23 14:08:44 +02:00
parent 21fc38a875
commit 23273d09e2

24
Makefile Normal file
View file

@ -0,0 +1,24 @@
# SPDX-License-Identifier: MIT
CC = gcc
CFLAGS = -Wall -Wextra -Werror -Wno-unused-parameter
CFLAGS += -Wno-unused-variable -Wno-unused-function
CFLAGS += -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-label
C_SOURCES = $(wildcard *.c)
C_HEADERS = $(wildcard *.h)
OBJECTS = $(C_SOURCES:.c=.o)
all: $(OBJECTS)
%.o: %.c $(C_HEADERS)
@echo "CC $<"
@$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS)
format:
clang-format -i $(C_SOURCES) $(C_HEADERS)
.PHONY: all clean format