xref: /titanic_50/usr/src/cmd/cmd-inet/lib/ipmgmtd/Makefile (revision 12240b1daf1d29749412cd4091e50e29cda86615)
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# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
22#
23
24# Needed for ROOTFS_LIBDIR definition
25include		../../../../lib/Makefile.lib
26
27PROG=		ipmgmtd
28OBJS=		ipmgmt_main.o ipmgmt_door.o ipmgmt_persist.o ipmgmt_util.o
29SRCS=		$(OBJS:.o=.c)
30SVCMETHOD=	net-ipmgmt
31MANIFEST=	network-ipmgmt.xml
32CFGFILES=	ipadm.conf
33
34# Needed for ROOTETC definition
35include		../../../Makefile.cmd
36
37ROOTCFGDIR=		$(ROOTETC)/ipadm
38ROOTCFGFILES=		$(CFGFILES:%=$(ROOTCFGDIR)/%)
39ROOTMANIFESTDIR=	$(ROOTSVCNETWORK)
40
41$(ROOTCFGFILES)	:= OWNER= ipadm
42$(ROOTCFGFILES)	:= GROUP= sys
43$(ROOTCFGFILES)	:= FILEMODE= 644
44
45ROOTCMDDIR=	$(ROOTFS_LIBDIR)/inet
46
47LDLIBS += -lipadm -lnvpair -lsecdb -lnsl -lumem -lscf
48
49#
50# Instrument ipmgmtd with CTF data to ease debugging.
51#
52CTFCONVERT_HOOK = && $(CTFCONVERT_O)
53CTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS)
54$(OBJS) := CFLAGS += $(CTF_FLAGS)
55
56.KEEP_STATE:
57
58.PARALLEL:
59
60all: $(PROG)
61
62$(PROG): $(OBJS)
63	$(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK)
64	$(POST_PROCESS)
65
66install: $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD) $(ROOTCFGDIR) \
67	$(ROOTCFGFILES)
68
69check:  $(SRCS) $(HEADERS) $(CHKMANIFEST)
70	$(CSTYLE) -cpP $(SRCS) $(HEADERS)
71
72$(ROOTCMD): $(PROG)
73
74clean:
75	$(RM) $(OBJS)
76
77lint:	lint_SRCS
78
79$(ROOTCFGDIR):
80	$(INS.dir)
81
82$(ROOTCFGDIR)/%: $(ROOTCFGDIR) %
83	$(INS.file)
84
85include 	../../../Makefile.targ
86