freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master b328afa: graph/x11/rules.mk: Use standard pkg-c


From: Werner Lemberg
Subject: [freetype2-demos] master b328afa: graph/x11/rules.mk: Use standard pkg-config variable naming
Date: Wed, 13 Oct 2021 09:02:45 -0400 (EDT)

branch: master
commit b328afa5eea180ef063ccc56d6f59c40bcd425cd
Author: Hugh McMaster <hugh.mcmaster@outlook.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    graph/x11/rules.mk: Use standard pkg-config variable naming
---
 README             |  4 ++++
 graph/x11/rules.mk | 12 ++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/README b/README
index 4cfcd3c..325ade0 100644
--- a/README
+++ b/README
@@ -36,6 +36,10 @@ WARNING WARNING WARNING WARNING WARNING WARNING WARNING 
WARNING WARNING
     using pkg-config. If X11 is not found, some demo programs will
     not be able to display graphics and will fail.
 
+    Users with X11 installed in a non-standard location can specify
+    the paths to the development headers and library by passing the
+    X11_CFLAGS and X11_LIBS variables on the command line.
+
     If you  don't have X11  at all, fix  the definition of  the `EXES`
     variable as described in the top-level Makefile.
 
diff --git a/graph/x11/rules.mk b/graph/x11/rules.mk
index 9072f98..e58c8e8 100644
--- a/graph/x11/rules.mk
+++ b/graph/x11/rules.mk
@@ -9,14 +9,14 @@ ifeq ($(PKG_CONFIG),)
   PKG_CONFIG = pkg-config
 endif
 
-X11_INCLUDE := $(shell $(PKG_CONFIG) --cflags x11)
-X11_LIB     := $(shell $(PKG_CONFIG) --libs x11)
+X11_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags x11)
+X11_LIBS   ?= $(shell $(PKG_CONFIG) --libs x11)
 
-ifneq ($(X11_LIB),)
+ifneq ($(X11_LIBS),)
   # The GRAPH_LINK variable is expanded each time an executable is linked
   # against the graphics library.
   #
-  GRAPH_LINK += $(X11_LIB)
+  GRAPH_LINK += $(X11_LIBS)
 
   # Solaris needs a -lsocket in GRAPH_LINK.
   #
@@ -41,12 +41,12 @@ ifneq ($(X11_LIB),)
          $(LIBTOOL) --mode=compile $(CC) -static $(CFLAGS) \
                      $(GRAPH_INCLUDES:%=$I%) \
                      $I$(subst /,$(COMPILER_SEP),$(GR_X11)) \
-                     $(X11_INCLUDE:%=$I%) \
+                     $(X11_CFLAGS:%=$I%) \
                      $T$(subst /,$(COMPILER_SEP),$@ $<)
   else
          $(CC) $(CFLAGS) $(GRAPH_INCLUDES:%=$I%) \
                 $I$(subst /,$(COMPILER_SEP),$(GR_X11)) \
-                $(X11_INCLUDE:%=$I%) \
+                $(X11_CFLAGS:%=$I%) \
                 $T$(subst /,$(COMPILER_SEP),$@ $<)
   endif
 endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]