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