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