ringbuf/Makefile
2024-06-23 14:08:44 +02:00

24 lines
No EOL
497 B
Makefile

# 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