netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/7] turn Makefile more distribution friendly
@ 2015-04-13 14:00 Pavel Šimerda
  2015-04-13 14:00 ` [PATCH 3/7] ip-xfrm: support 'proto any' with 'sport' and 'dport' Pavel Šimerda
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Pavel Šimerda @ 2015-04-13 14:00 UTC (permalink / raw)
  To: netdev; +Cc: stephen, psimerda

From: Pavel Šimerda <psimerda@redhat.com>

Changes:

 * Accept directory settings from environment.
 * Remove redundant ROOTDIR variable.
 * Set KERNEL_INCLUDE default to '/usr/include'.
 * Use CFLAGS from environemnt.

Note: In the long term it might be better to improve the configure
script to generate those parts of the Makefile in a manner similar
to autoconf. It might be even practical to autotoolize the package.

Signed-off-by: Pavel Šimerda <psimerda@redhat.com>
---
 Makefile | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 9dbb29f..18faee4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,15 @@
-ROOTDIR=$(DESTDIR)
-PREFIX=/usr
-LIBDIR=$(PREFIX)/lib
-SBINDIR=/sbin
-CONFDIR=/etc/iproute2
-DATADIR=$(PREFIX)/share
-DOCDIR=$(DATADIR)/doc/iproute2
-MANDIR=$(DATADIR)/man
-ARPDDIR=/var/lib/arpd
+PREFIX?=/usr
+LIBDIR?=$(PREFIX)/lib
+SBINDIR?=/sbin
+CONFDIR?=/etc/iproute2
+DATADIR?=$(PREFIX)/share
+DOCDIR?=$(DATADIR)/doc/iproute2
+MANDIR?=$(DATADIR)/man
+ARPDDIR?=/var/lib/arpd
+KERNEL_INCLUDE?=/usr/include
 
 # Path to db_185.h include
-DBM_INCLUDE:=$(ROOTDIR)/usr/include
+DBM_INCLUDE:=$(DESTDIR)/usr/include
 
 SHARED_LIBS = y
 
@@ -33,7 +33,7 @@ CCOPTS = -O2
 WFLAGS := -Wall -Wstrict-prototypes  -Wmissing-prototypes
 WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
 
-CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
+CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS)
 YACCFLAGS = -d -t -v
 
 SUBDIRS=lib ip tc bridge misc netem genl man
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-11 17:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-13 14:00 [PATCH 2/7] turn Makefile more distribution friendly Pavel Šimerda
2015-04-13 14:00 ` [PATCH 3/7] ip-xfrm: support 'proto any' with 'sport' and 'dport' Pavel Šimerda
2015-04-13 14:00 ` [PATCH 4/7] cbq: fix find syntax in example Pavel Šimerda
2015-04-13 14:00 ` [PATCH 5/7] ip-route: don't hide routes with RTM_F_CLONED by default Pavel Šimerda
2015-05-04 15:37   ` Stephen Hemminger
2015-05-04 18:37     ` David Miller
2015-05-11 17:48       ` Pavel Šimerda
2015-04-13 14:01 ` [PATCH 6/7] lnstat: dump to stdout, not stderr Pavel Šimerda
2015-04-13 14:01 ` [PATCH 7/7] lnstat: run indefinitely by default Pavel Šimerda
2015-04-20 16:55 ` [PATCH 2/7] turn Makefile more distribution friendly Stephen Hemminger
2015-04-21 15:32   ` Pavel Šimerda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).