1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
From: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Date: Sat, 10 Oct 2015 19:55:38 +0300
Subject: Remove custom library search paths from Makefiles
This patch removes library search and include paths (such as -L/usr/lib)
defined by upstream. Since all the libraries and headers needed are
available in the default path, these flags are redundant. In addition,
since '/usr/lib' may have different purpose on various architectures,
like mips*, it causes FTBFS.
Thanks to YunQiang Su for bringing this up.
Author: Vasudev Kamath <kamathvasudev@gmail.com>
Bug-Debian: https://bugs.debian.org/722839
Forwarded: no
---
dmenu/config.mk | 4 ++--
lsw/config.mk | 4 ++--
slock/config.mk | 4 ++--
slstatus/config.mk | 4 ++--
sprop/config.mk | 4 ++--
sselp/config.mk | 4 ++--
ssid/config.mk | 4 ++--
swarp/config.mk | 4 ++--
tabbed/Makefile | 4 ++--
wmname/config.mk | 4 ++--
xssstate/config.mk | 4 ++--
11 files changed, 22 insertions(+), 22 deletions(-)
--- a/dmenu/config.mk
+++ b/dmenu/config.mk
@@ -20,8 +20,8 @@ FREETYPEINC = /usr/include/freetype2
#MANPREFIX = ${PREFIX}/man
# includes and libs
-INCS = -I$(X11INC) -I$(FREETYPEINC)
-LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
+INCS = $(shell $(PKG_CONFIG) --cflags fontconfig xft)
+LIBS = -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
# flags
CPPFLAGS += -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
--- a/lsw/config.mk
+++ b/lsw/config.mk
@@ -9,8 +9,8 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
-INCS = -I${X11INC}
-LIBS = -L${X11LIB} -lX11
+INCS =
+LIBS = -lX11
# flags
CPPFLAGS += -DVERSION=\"${VERSION}\"
--- a/slock/config.mk
+++ b/slock/config.mk
@@ -11,8 +11,8 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext -lXrandr
+INCS =
+LIBS = -lc -lcrypt -lX11 -lXext -lXrandr
# flags
CPPFLAGS += -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -DHAVE_SHADOW_H
--- a/sprop/config.mk
+++ b/sprop/config.mk
@@ -11,8 +11,8 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
+INCS =
+LIBS = -lc -lX11
# flags
CPPFLAGS += -DVERSION=\"${VERSION}\"
--- a/sselp/config.mk
+++ b/sselp/config.mk
@@ -11,8 +11,8 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
+INCS =
+LIBS = -lc -lX11
# flags
CPPFLAGS += -DVERSION=\"${VERSION}\"
--- a/ssid/config.mk
+++ b/ssid/config.mk
@@ -7,8 +7,8 @@ VERSION = 0.1
PREFIX = /usr/local
# includes and libs
-INCS = -I. -I/usr/include
-LIBS = -L/usr/lib -lc
+INCS =
+LIBS = -lc
# flags
CFLAGS += ${INCS} -DVERSION=\"${VERSION}\" ${CPPFLAGS}
--- a/swarp/config.mk
+++ b/swarp/config.mk
@@ -11,8 +11,8 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
+INCS =
+LIBS = -lc -lX11
# flags
CFLAGS += ${INCS} -DVERSION=\"${VERSION}\" ${CPPFLAGS}
--- a/wmname/config.mk
+++ b/wmname/config.mk
@@ -11,8 +11,8 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
+INCS =
+LIBS = -lc -lX11
# flags
CPPFLAGS += -DVERSION=\"${VERSION}\"
--- a/xssstate/config.mk
+++ b/xssstate/config.mk
@@ -8,8 +8,8 @@ PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
# includes and libs
-INCS = -I. -I/usr/include
-LIBS = -L/usr/lib -lc -lX11 -lXss
+INCS =
+LIBS = -lc -lX11 -lXss
# flags
CPPFLAGS += -DVERSION=\"${VERSION}\"
--- a/tabbed/Makefile
+++ b/tabbed/Makefile
@@ -9,8 +9,8 @@ MANPREFIX = ${PREFIX}/share/man
DOCPREFIX = ${PREFIX}/share/doc/${NAME}
# use system flags.
-CFLAGS += -I/usr/X11R6/include -I/usr/include/freetype2
-LDFLAGS += -L/usr/X11R6/lib -lX11 -lfontconfig -lXft
+CFLAGS += $(shell $(PKG_CONFIG) --cflags fontconfig xft)
+LDFLAGS += -lX11 $(shell $(PKG_CONFIG) --libs fontconfig xft)
CPPFLAGS += -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700L
# OpenBSD (uncomment)
--- a/slstatus/config.mk
+++ b/slstatus/config.mk
@@ -11,9 +11,9 @@ X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# flags
-CPPFLAGS += -I$(X11INC) -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
+CPPFLAGS += -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
-LDFLAGS += -L$(X11LIB)
+LDFLAGS +=
# OpenBSD: add -lsndio
# FreeBSD: add -lkvm -lsndio
LDLIBS += -lX11
|