Add Windows (MSYS2/MinGW) build support and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-09-10 08:51:57 +02:00
commit 35695f97d0
2 changed files with 38 additions and 2 deletions

View file

@ -16,7 +16,15 @@ GTK_LIBS := $(shell $(PKG_CONFIG) --libs gtk4)
CFLAGS = -Wall -Wextra -Wno-deprecated-declarations $(GTK_CFLAGS)
LIBS = $(GTK_LIBS) -lm
# Windows (MSYS2 / MinGW): .exe suffix and no console window for the GUI.
ifeq ($(OS),Windows_NT)
TARGET = maturita.exe
LIBS += -mwindows
else
TARGET = maturita
endif
SRC = maturita.c
all: $(TARGET)
@ -25,7 +33,7 @@ $(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LIBS)
clean:
rm -f $(TARGET)
rm -f $(TARGET) maturita.exe
run: $(TARGET)
./$(TARGET)