initial commit

This commit is contained in:
laura 2025-11-10 04:53:37 -03:00
commit 4de9088898
Signed by: w
GPG key ID: BCD2117C99E69817
13 changed files with 610 additions and 0 deletions

33
Makefile Normal file
View file

@ -0,0 +1,33 @@
TARGET = ratazana
CC = clang
CFLAGS = -Wall -Wextra -pedantic -std=c23 -O2
DEBUGFLAGS = -g -O0 -DDEBUG -fsanitize=address -fsanitize=undefined
LDFLAGS =
LIBS =
SOURCES = hidpp20.c hidraw.c utils.c main.c
HEADERS = ratazana.h hidpp20.h hexdump.h
OBJECTS = $(SOURCES:.c=.o)
all: $(TARGET)
debug: CFLAGS += $(DEBUGFLAGS)
debug: clean $(TARGET)
$(TARGET): $(OBJECTS)
@$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
%.o: %.c ratazana.h
@$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET)
fmt:
clang-format -i $(SOURCES) $(HEADERS)
lint:
clang-tidy $(SOURCES) -- $(CFLAGS)
.PHONY: all debug clean fmt lint