]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blob - Makefile
More build and target directory changes.
[lisovros/iproute2_canprio.git] / Makefile
1 # Path to parent kernel include files directory
2 DESTDIR=
3 SBINDIR=/usr/sbin
4 CONFDIR=/etc/iproute2
5 DOCDIR=/usr/doc/iproute2
6
7 KERNEL_INCLUDE=/usr/include
8 LIBC_INCLUDE=/usr/include
9
10 DEFINES= -DRESOLVE_HOSTNAMES
11
12 #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
13 LDLIBS=-lresolv
14 ADDLIB=
15
16 #options if you compile with libc5, and without a bind>=4.9.4 libresolv
17 #LDLIBS=
18 #ADDLIB=inet_ntop.o inet_pton.o
19
20 #options for decnet
21 ADDLIB+=dnet_ntop.o dnet_pton.o
22
23 #options for ipx
24 ADDLIB+=ipx_ntop.o ipx_pton.o
25
26 CC = gcc
27 CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
28 CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include -I/usr/include/db41 $(DEFINES)
29
30 LDLIBS += -L../lib -lnetlink -lutil
31
32 SUBDIRS=lib ip tc misc
33
34 LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
35
36 all:
37         for i in $(SUBDIRS); \
38         do $(MAKE) -C $$i; done
39
40 install: all
41         install -m 0755 -d $(DESTDIR)$(SBINDIR)
42         install -m 0755 -d $(DESTDIR)$(CONFDIR)
43         install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
44         install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
45         install -m 0644 README.iproute2+tc $(shell find examples -type f -maxdepth 1) $(DESTDIR)$(DOCDIR)/examples
46         install -m 0644 $(shell echo examples/diffserv/*) $(DESTDIR)$(DOCDIR)/examples/diffserv
47         @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done
48         @cd etc/iproute2; for i in *; do \
49                 if [ ! -e $(DESTDIR)$(CONFDIR)/$$i ]; then \
50                         echo install -m 0644 $$i $(DESTDIR)$(CONFDIR); \
51                         install -m 0644 $$i $(DESTDIR)$(CONFDIR); fi; done
52
53 clean:
54         for i in $(SUBDIRS) doc; \
55         do $(MAKE) -C $$i clean; done
56
57 .EXPORT_ALL_VARIABLES: