Initial commit

This commit is contained in:
2025-10-05 07:51:25 +04:00
commit 88d3296371
8 changed files with 574 additions and 0 deletions

29
Makefile Normal file
View File

@@ -0,0 +1,29 @@
CC = gcc
CFLAGS = -std=gnu23 -Wall -Wextra
LIBS = -lgdi32
TARGET = main.exe
SOURCES = main.c utils/utils.c
OBJECTS = $(SOURCES:.c=.o)
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) -o $@ $^ $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
@if command -v rm >/dev/null 2>&1; then \
rm -f $(TARGET) main.o utils/utils.o; \
else \
powershell -Command "Remove-Item -ErrorAction SilentlyContinue '$(TARGET)', 'main.o', 'utils/utils.o'"; \
fi
rebuild: clean all
run: $(TARGET)
.\$(TARGET)
.PHONY: all clean rebuild run