ctemp

Set color temperature
git clone git://git.akobets.xyz/ctemp
Log | Files | Refs | README | LICENSE

commit 948de7c2131be32528e32990f514671673cb70a1
parent 4d4dfb362883b3ce1284224046aadab4603243c2
Author: Artem Kobets <artem@akobets.xyz>
Date:   Wed,  4 Mar 2020 19:15:04 +0200

config.mk: add HAVE_* makefile flags

Diffstat:
Mconfig.mk | 49+++++++++++++++++++++++++++++--------------------
1 file changed, 29 insertions(+), 20 deletions(-)

diff --git a/config.mk b/config.mk @@ -2,33 +2,42 @@ VERSION = 0.1.0 PREFIX = /usr/local -X11INC = /usr/X11R6/include -X11LIB = /usr/X11R6/lib - # DRM support -# comment to disable -DRM_INCS = -I/usr/include/libdrm -DRM_LIBS = -ldrm -DRM_FLAGS = -DDRM_SUPPORT - +HAVE_DRM = ON +# Quartz (OS X) support +HAVE_QUARTZ = OFF # X support -# comment to disable -X_INCS = -I$(X11INC) -X_LIBS = -L$(X11LIB) -lX11 -lXrandr -X_FLAGS = -DX_SUPPORT +HAVE_X = ON -# Quartz (OS X) support -# comment to disable -# QUARTZ_INCS = -framework CoreGraphics -# QUARTZ_LIBS = -# QUARTZ_FLAGS = -DQUARTZ_SUPPORT -D_DARWIN_C_SOURCE +X11INC = /usr/X11R6/include +X11LIB = /usr/X11R6/lib -INCS = $(DRM_INCS) $(X_INCS) $(QUARTZ_INCS) -LIBS = $(DRM_LIBS) $(X_LIBS) $(QUARTZ_INCS) +DRM_INCS_ON = -I/usr/include/libdrm +DRM_LIBS_ON = -ldrm +DRM_FLAGS_ON = -DDRM_SUPPORT +QUARTZ_INCS_ON = -framework CoreGraphics +QUARTZ_LIBS_ON = +QUARTZ_FLAGS_ON = -DQUARTZ_SUPPORT -D_DARWIN_C_SOURCE +X_INCS_ON = -I$(X11INC) +X_LIBS_ON = -L$(X11LIB) -lX11 -lXrandr +X_FLAGS_ON = -DX_SUPPORT + +DRM_INCS = $(DRM_INCS_$(HAVE_DRM)) +DRM_LIBS = $(DRM_LIBS_$(HAVE_DRM)) +DRM_FLAGS = $(DRM_FLAGS_$(HAVE_DRM)) +QUARTZ_INCS = $(QUARTZ_INCS_$(HAVE_QUARTZ)) +QUARTZ_LIBS = $(QUARTZ_LIBS_$(HAVE_QUARTZ)) +QUARTZ_FLAGS = $(QUARTZ_FLAGS_$(HAVE_QUARTZ)) +X_INCS = $(X_INCS_$(HAVE_X)) +X_LIBS = $(X_LIBS_$(HAVE_X)) +X_FLAGS = $(X_FLAGS_$(HAVE_X)) + +INCS = $(DRM_INCS) $(QUARTZ_INCS) $(X_INCS) +LIBS = $(DRM_LIBS) $(QUARTZ_INCS) $(X_LIBS) CPPFLAGS = -DVERSION=\"$(VERSION)\" \ -D_POSIX_C_SOURCE=200809L \ -D_XOPEN_SOURCE=700 \ - $(DRM_FLAGS) $(X_FLAGS) $(QUARTZ_FLAGS) + $(DRM_FLAGS) $(QUARTZ_FLAGS) $(X_FLAGS) CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS) LDFLAGS = $(LIBS)