xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.lib/vrrpd/Makefile (revision 8226594fdd4479be135127f43632f1f995074654)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25PROG=		vrrpd
26OBJS=		vrrpd.o
27SVCMETHOD=	svc-vrrp
28MANIFEST=	vrrp.xml
29CFGFILES=	vrrp.conf
30
31include ../../../Makefile.cmd
32
33ROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
34
35$(ROOTETC)/inet/$(CFGFILES):= FILEMODE= 644
36$(ROOTETC)/inet/$(CFGFILES):= OWNER= root
37$(ROOTETC)/inet/$(CFGFILES):= GROUP= sys
38
39CSTD=		$(CSTD_GNU99)
40
41#
42# We need access to the ancillary data features which are only available
43# via the SUS standards.  Further, C99 support requires SUSv3 or higher.
44#
45CPPFLAGS += -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
46LDLIBS += -lvrrpadm -lsocket -lnsl -ldladm -linetutil -lipadm -lsysevent -lnvpair -lsecdb
47
48CERRWARN += $(CNOWARN_UNINIT)
49
50#
51# Instrument vrrpd with CTF data to ease debugging.
52#
53CTFCONVERT_HOOK = && $(CTFCONVERT_O)
54CTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS)
55$(OBJS) := CFLAGS += $(CTF_FLAGS)
56
57# for messaging catalog. No messages are present in CMN_DIR sources.
58POFILES = $(LOCAL_OBJS:%.o=%.po)
59XGETFLAGS += -a -x vrrpd.xcl
60
61.KEEP_STATE:
62
63all: $(PROG)
64
65$(PROG): $(OBJS)
66	$(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK)
67	$(POST_PROCESS)
68
69include ../Makefile.lib
70
71install: all $(ROOTLIBINETPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) \
72	$(ROOTETC)/inet/$(CFGFILES)
73
74check:	$(CHKMANIFEST)
75
76clean:
77	$(RM) $(OBJS)
78
79include ../../../Makefile.targ
80