diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-05 08:06:47 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-05 08:06:47 +0100 |
commit | 3f1e02077014c6af2d5369cb8370dff43a651858 (patch) | |
tree | 463d3b9b92cea5809913f446cc2dd9e0d2045336 | |
parent | Unlist redshift/issues/574 (diff) | |
download | redshift-ng-3f1e02077014c6af2d5369cb8370dff43a651858.tar.gz redshift-ng-3f1e02077014c6af2d5369cb8370dff43a651858.tar.bz2 redshift-ng-3f1e02077014c6af2d5369cb8370dff43a651858.tar.xz |
config.mk: make pkg-config replacable and list all pkg-config covered libraries in on macro
Signed-off-by: Mattias Andrée <m@maandree.se>
-rw-r--r-- | src/config.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/config.mk b/src/config.mk index 0b35989..f956ffb 100644 --- a/src/config.mk +++ b/src/config.mk @@ -3,12 +3,18 @@ MANPREFIX = $(PREFIX)/share/man CC = c99 +PKGCONFIG = pkg-config +PKGCONFIG_CFLAGS = $(PKGCONFIG) --cflags +PKGCONFIG_LDFLAGS = $(PKGCONFIG) --libs + DRM_LIBS = libdrm GEOCLUE_LIBS = glib-2.0 gio-2.0 RANDR_LIBS = xcb xcb-randr VIDMODE_LIBS = x11 xxf86vm +LIBS_PKGCONFIG = $(DRM_LIBS) $(GEOCLUE_LIBS) $(RANDR_LIBS) $(VIDMODE_LIBS) + CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE\ -DENABLE_DRM -DENABLE_GEOCLUE2 -DENABLE_RANDR -DENABLE_VIDMODE -CFLAGS = $$(pkg-config --cflags $(DRM_LIBS) $(GEOCLUE_LIBS) $(RANDR_LIBS) $(VIDMODE_LIBS)) -LDFLAGS = $$(pkg-config --libs $(DRM_LIBS) $(GEOCLUE_LIBS) $(RANDR_LIBS) $(VIDMODE_LIBS)) -lm +CFLAGS = $$($(PKGCONFIG_CFLAGS) $(LIBS_PKGCONFIG)) +LDFLAGS = $$($(PKGCONFIG_LDFLAGS) $(LIBS_PKGCONFIG)) -lm |