commit: 19badf633110a7e507c2271ecbfb05e99ce664d6
parent cff25eb606b7ba3f6be13c9fe74bf2561147c4b8
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 16 Jun 2025 11:35:47 +0200
Makefile: generate config.h
Diffstat:
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -3,3 +3,4 @@
/xcursorgen
/Xcursor/file.o
+/config.h
diff --git a/Makefile b/Makefile
@@ -18,11 +18,14 @@ PNG_LIBS = `${PKG_CONFIG} --libs libpng`
all: xcursorgen
+config.h: Makefile
+ printf '#define PACKAGE_VERSION "%s"\n' "${VERSION}" > config.h
+
Xcursor/file.o: Xcursor/file.c
${CC} -std=c99 ${CFLAGS} -c -o $@ Xcursor/file.c
XCURSORGEN_SRC = xcursorgen.c Xcursor/file.o
-xcursorgen: ${XCURSORGEN_SRC} | *.h Xcursor/*.h
+xcursorgen: ${XCURSORGEN_SRC} config.h Xcursor/Xcursor.h
${CC} -std=c99 ${CFLAGS} ${PNG_CFLAGS} -o $@ ${XCURSORGEN_SRC} ${LDFLAGS} ${PNG_LIBS}
.PHONY: install
diff --git a/config.h b/config.h
@@ -1,4 +0,0 @@
-// SPDX-FileCopyrightText: 2023 Haelwenn (lanodan) Monnier
-// SPDX-License-Identifier: MIT
-
-#define PACKAGE_VERSION "0.0.1"
-\ No newline at end of file