Skip to content
Snippets Groups Projects
Commit b328afa5 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexei Podtelezhnikov
Browse files

graph/x11/rules.mk: Use standard pkg-config variable naming

parent acf0ea36
No related branches found
No related tags found
Loading
......@@ -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.
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment