File: Makefile

package info (click to toggle)
ipvsadm 1%3A1.26-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 520 kB
  • ctags: 1,435
  • sloc: ansic: 3,686; sh: 221; makefile: 137
file content (33 lines) | stat: -rw-r--r-- 798 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
# Makefile for libipvs

CC		= gcc
CFLAGS		= -Wall -Wunused -Wstrict-prototypes -g -fPIC
ifneq (0,$(HAVE_NL))
CFLAGS		+= -DLIBIPVS_USE_NL
INCLUDE          += $(shell pkg-config --cflags libnl-3.0 libnl-genl-3.0)
endif

INCLUDE		+= $(shell if [ -f ../../ip_vs.h ]; then	\
		     echo "-I../../."; fi;)
DEFINES		= $(shell if [ ! -f ../../ip_vs.h ]; then	\
		    echo "-DHAVE_NET_IP_VS_H"; fi;)

.PHONY		= all clean install dist distclean rpm rpms
STATIC_LIB	= libipvs.a
SHARED_LIB	= libipvs.so

all:		$(STATIC_LIB) $(SHARED_LIB)

$(STATIC_LIB):	libipvs.o ip_vs_nl_policy.o
		ar rv $@ $^

$(SHARED_LIB):	libipvs.o ip_vs_nl_policy.o
		$(CC) -shared -Wl,-soname,$@ -o $@ $^

%.o:		%.c
		$(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<

clean:
		rm -f *.[ao] *~ *.orig *.rej core *.so

distclean:	clean