xref: /illumos-gate/usr/src/cmd/rcap/rcapd/Makefile (revision 65bed588e62c7f3a0da5d65fcc588b46b470f5a7)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26include ../../Makefile.cmd
27include ../../Makefile.cmd.64
28
29.KEEP_STATE:
30
31PROG				= rcapd
32ROOTUSRLIBRCAP			= $(ROOT)/usr/lib/rcap
33ROOTUSRLIBRCAPPROG		= $(ROOTUSRLIBRCAP)/$(PROG)
34
35COMMON_DIR=	../common
36
37MANIFEST = rcap.xml
38ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
39$(ROOTSVCSYSTEM)/rcap.xml := FILEMODE = 0444
40
41
42SRCS =	rcapd_main.c \
43	rcapd_collection.c \
44	rcapd_collection_project.c \
45	rcapd_collection_zone.c \
46	rcapd_mapping.c \
47	rcapd_rfd.c \
48	rcapd_scanner.c \
49	rcapd_stat.c \
50	utils.c
51
52LINTSRCS = rcapd_main.c \
53	rcapd_collection.c \
54	rcapd_collection_project.c \
55	rcapd_collection_zone.c \
56	rcapd_mapping.c \
57	rcapd_rfd.c \
58	rcapd_scanner.c \
59	$(COMMON_DIR)/rcapd_stat.c \
60	$(COMMON_DIR)/utils.c
61
62$(NOT_RELEASE_BUILD)CPPFLAGS	+= -DDEBUG
63CPPFLAGS			+= -DDEBUG_MSG
64CPPFLAGS			+= -I$(COMMON_DIR)
65LDLIBS			+= -lkstat -lproc -lproject -lzonecfg -lumem -lscf
66LDLIBS			+= $(EXTRA_LDLIBS)
67
68LINTFLAGS64		+= -u
69
70OBJS =			$(SRCS:%.c=%.o) rcapd_conf.o
71
72POFILES =		$(OBJS:%.o=%.po)
73POFILE =		$(PROG).po
74
75CLOBBERFILES +=		$(POFILES) $(POFILE)
76
77include ../Makefile.com
78
79.NO_PARALLEL:
80.PARALLEL: $(OBJS)
81
82all: $(PROG)
83
84install: all $(ROOTUSRLIBRCAPPROG) $(ROOTUSRLIBRCAP) $(ROOTMANIFEST)
85
86$(PROG): $(OBJS)
87	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
88	$(POST_PROCESS)
89
90check: $(CHKMANIFEST)
91
92clean:
93	$(RM) $(OBJS)
94	$(RM) rcapd_conf.c
95
96lint:
97	$(LINT.c) $(LINTSRCS) $(LDLIBS)
98
99$(POFILE): $(POFILES)
100	$(RM) $@
101	$(CAT) $(POFILES) > $@
102
103$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) %
104	$(INS.file)
105
106include ../../Makefile.targ
107