mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-24 10:23:40 +08:00
d1e48c7e5c
(Logical change 1.34)
63 lines
1.5 KiB
Makefile
63 lines
1.5 KiB
Makefile
DESTDIR=
|
|
SBINDIR=/usr/sbin
|
|
CONFDIR=/etc/iproute2
|
|
DOCDIR=/usr/doc/iproute2
|
|
|
|
# Path to parent kernel include files directory
|
|
KERNEL_INCLUDE:=/usr/include
|
|
|
|
# Path to db_185.h include
|
|
DBM_INCLUDE:=/usr/include
|
|
|
|
DEFINES= -DRESOLVE_HOSTNAMES
|
|
|
|
#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
|
|
LDLIBS=-lresolv
|
|
ADDLIB=
|
|
|
|
#options for decnet
|
|
ADDLIB+=dnet_ntop.o dnet_pton.o
|
|
|
|
#options for ipx
|
|
ADDLIB+=ipx_ntop.o ipx_pton.o
|
|
|
|
CC = gcc
|
|
CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
|
CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
|
|
|
|
LDLIBS += -L../lib -lnetlink -lutil
|
|
|
|
SUBDIRS=lib ip tc misc
|
|
|
|
LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
|
|
|
|
all: Config
|
|
@for i in $(SUBDIRS); \
|
|
do $(MAKE) $(MFLAGS) -C $$i; done
|
|
|
|
Config:
|
|
./configure $(KERNEL_INCLUDE)
|
|
|
|
install: all
|
|
install -m 0755 -d $(DESTDIR)$(SBINDIR)
|
|
install -m 0755 -d $(CONFDIR)
|
|
install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
|
|
install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
|
|
install -m 0644 README.iproute2+tc $(shell find examples -type f -maxdepth 1) $(DESTDIR)$(DOCDIR)/examples
|
|
install -m 0644 $(shell echo examples/diffserv/*) $(DESTDIR)$(DOCDIR)/examples/diffserv
|
|
@for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
|
|
@cd etc/iproute2; for i in *; do \
|
|
if [ ! -e $(CONFDIR)/$$i ]; then \
|
|
echo install -m 0644 $$i $(CONFDIR); \
|
|
install -m 0644 $$i $(CONFDIR); fi; done
|
|
|
|
clean:
|
|
@for i in $(SUBDIRS) doc; \
|
|
do $(MAKE) $(MFLAGS) -C $$i clean; done
|
|
|
|
clobber: clean
|
|
rm -f Config
|
|
|
|
|
|
.EXPORT_ALL_VARIABLES:
|