feat: switch to git based versioning

- Makefile computes version automatically
- added version flag for splash cli
This commit is contained in:
2026-05-29 11:17:28 +05:30
parent f0578aabfa
commit 52b221cf73
2 changed files with 12 additions and 0 deletions

View File

@@ -1,10 +1,13 @@
# Makefile for gsplash (community-standard layout)
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "unknown")
PREFIX ?= /usr/local
bindir ?= $(PREFIX)/bin
CC ?= gcc
CFLAGS ?= -O2 -Wall -Wextra
CFLAGS += -DGSPLASH_VERSION=\"$(VERSION)\"
PKG_CONFIG ?= pkg-config
SDL_CFLAGS := $(shell $(PKG_CONFIG) --cflags sdl2 SDL2_image)