Commit 06ec9039 authored by Pavel Šimerda's avatar Pavel Šimerda Committed by Stephen Hemminger

turn Makefile more distribution friendly

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: default avatarPavel Šimerda <psimerda@redhat.com>
parent b8d5c9a7
ROOTDIR=$(DESTDIR) PREFIX?=/usr
PREFIX=/usr LIBDIR?=$(PREFIX)/lib
LIBDIR=$(PREFIX)/lib SBINDIR?=/sbin
SBINDIR=/sbin CONFDIR?=/etc/iproute2
CONFDIR=/etc/iproute2 DATADIR?=$(PREFIX)/share
DATADIR=$(PREFIX)/share DOCDIR?=$(DATADIR)/doc/iproute2
DOCDIR=$(DATADIR)/doc/iproute2 MANDIR?=$(DATADIR)/man
MANDIR=$(DATADIR)/man ARPDDIR?=/var/lib/arpd
ARPDDIR=/var/lib/arpd KERNEL_INCLUDE?=/usr/include
# Path to db_185.h include # Path to db_185.h include
DBM_INCLUDE:=$(ROOTDIR)/usr/include DBM_INCLUDE:=$(DESTDIR)/usr/include
SHARED_LIBS = y SHARED_LIBS = y
...@@ -36,7 +36,7 @@ CCOPTS = -O2 ...@@ -36,7 +36,7 @@ CCOPTS = -O2
WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 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 YACCFLAGS = -d -t -v
SUBDIRS=lib ip tc bridge misc netem genl man SUBDIRS=lib ip tc bridge misc netem genl man
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment