This commit is contained in:
Passthem
2025-04-11 15:40:18 +08:00
commit 7e455c591a
10 changed files with 296 additions and 0 deletions

24
Makefile Normal file
View File

@ -0,0 +1,24 @@
CC = gcc
CFLAGS = -Wall -Wextra -O2
LDFLAGS = -lm
SRCS = main.c spi_utils.c color_utils.c shader.c
OBJS = $(SRCS:%.c=dist/%.o)
TARGET = dist/main
MKDIR_P = mkdir -p
all: $(TARGET)
$(TARGET): $(OBJS)
$(MKDIR_P) dist
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
dist/%.o: %.c
$(MKDIR_P) dist
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf dist
.PHONY: all clean