File: Makefile

package info (click to toggle)
iproute 980630-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 468 kB
  • ctags: 389
  • sloc: ansic: 8,276; makefile: 104
file content (41 lines) | stat: -rw-r--r-- 959 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Path to parent kernel include files directory (default /usr/include)
#KERNEL_INCLUDE=
#KERNEL_INCLUDE=/net/bh/var/src/vger/dist/linux/include
KERNEL_INCLUDE=/net/bh/home/root/vger-mirror/linux/include

#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
LDLIBS=-lresolv
ADDLIB=

#options if you compile with libc5, and without a bind>=4.9.4 libresolv
#LDLIBS=
#ADDLIB=inet_ntop.o inet_pton.o

CC=gcc
CFLAGS=-O2 -g -I$(KERNEL_INCLUDE) -I../include

LDLIBS += -L../lib -lnetlink -lutil

SUBDIRS=lib ip tc

LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a

all: check-kernel
	@set -e; \
	for i in $(SUBDIRS); \
	do $(MAKE) -C $$i; done

check-kernel:
ifeq ($(KERNEL_INCLUDE),)
	@echo "Please, set correct KERNEL_INCLUDE"; false
else
	@set -e; \
	if [ ! -r $(KERNEL_INCLUDE)/linux/autoconf.h ]; then \
		echo "Please, set correct KERNEL_INCLUDE"; false; fi
endif

clean:
	for i in $(SUBDIRS); \
	do $(MAKE) -C $$i clean; done

.EXPORT_ALL_VARIABLES: