]> git.proxmox.com Git - mirror_iproute2.git/blob - Makefile
ipxfrm-20040705.diff
[mirror_iproute2.git] / Makefile
1 DESTDIR=
2 SBINDIR=/usr/sbin
3 CONFDIR=/etc/iproute2
4 DOCDIR=/usr/doc/iproute2
5
6 # Path to parent kernel include files directory
7 KERNEL_INCLUDE:=/usr/include
8
9 # Path to db_185.h include
10 DBM_INCLUDE:=/usr/include
11
12 DEFINES= -DRESOLVE_HOSTNAMES
13
14 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
15 LDLIBS=-lresolv
16 ADDLIB=
17
18 #options for decnet
19 ADDLIB+=dnet_ntop.o dnet_pton.o
20
21 #options for ipx
22 ADDLIB+=ipx_ntop.o ipx_pton.o
23
24 CC = gcc
25 CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
26 CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
27
28 LDLIBS += -L../lib -lnetlink -lutil
29
30 SUBDIRS=lib ip tc misc
31
32 LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
33
34 all: Config
35 @for i in $(SUBDIRS); \
36 do $(MAKE) $(MFLAGS) -C $$i; done
37
38 Config:
39 ./configure $(KERNEL_INCLUDE)
40
41 install: all
42 install -m 0755 -d $(DESTDIR)$(SBINDIR)
43 install -m 0755 -d $(DESTDIR)$(CONFDIR)
44 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
45 install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
46 install -m 0644 README.iproute2+tc $(shell find examples -type f -maxdepth 1) \
47 $(DESTDIR)$(DOCDIR)/examples
48 install -m 0644 $(shell find examples/diffserv -type f -maxdepth 1) \
49 $(DESTDIR)$(DOCDIR)/examples/diffserv
50 @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
51 install -m 0644 $(shell find etc/iproute2 -type f -maxdepth 1) $(DESTDIR)$(CONFDIR)
52
53
54 clean:
55 @for i in $(SUBDIRS) doc; \
56 do $(MAKE) $(MFLAGS) -C $$i clean; done
57
58 clobber: clean
59 rm -f Config
60
61
62 .EXPORT_ALL_VARIABLES: