xref: /titanic_44/usr/src/cmd/rcap/rcapd/Makefile.rcapd (revision 5151fb1220e0ceafdc172203863c73da4285c170)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28.KEEP_STATE:
29.SUFFIXES:
30
31#
32# subdirs must define COMMON_DIR and include Makefile.com
33#
34
35SRCS =	rcapd_main.c \
36	rcapd_collection.c \
37	rcapd_collection_project.c \
38	rcapd_collection_zone.c \
39	rcapd_mapping.c \
40	rcapd_rfd.c \
41	rcapd_scanner.c \
42	rcapd_stat.c \
43	utils.c
44
45LINTSRCS = ../rcapd_main.c \
46	../rcapd_collection.c \
47	../rcapd_collection_project.c \
48	../rcapd_collection_zone.c \
49	../rcapd_mapping.c \
50	../rcapd_rfd.c \
51	../rcapd_scanner.c \
52	$(COMMON_DIR)/rcapd_stat.c \
53	$(COMMON_DIR)/utils.c
54
55$(NOT_RELEASE_BUILD)CPPFLAGS 	+= -DDEBUG
56CPPFLAGS			+= -DDEBUG_MSG
57CPPFLAGS 			+= -I$(COMMON_DIR)
58LDLIBS 				+= -lkstat -ll -lproc -lproject -lzonecfg -lumem
59LDLIBS				+= $(EXTRA_LDLIBS)
60
61LINTFLAGS			+= -u
62LINTFLAGS64			+= -u
63
64PROG =			rcapd
65OBJS =			$(SRCS:%.c=%.o) rcapd_conf.o
66
67POFILES =		$(OBJS:%.o=%.po)
68POFILE =		$(PROG).po
69
70CLOBBERFILES +=		$(POFILES) $(POFILE)
71
72.NO_PARALLEL:
73.PARALLEL: $(OBJS)
74
75all: $(PROG)
76
77$(PROG): $(OBJS)
78	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
79	$(POST_PROCESS)
80
81%.o: ../%.c
82	$(COMPILE.c) $<
83%.po: ../%.c
84	$(COMPILE.cpp) $< > $<.i
85	$(BUILD.po)
86
87
88clean:
89	$(RM) $(OBJS)
90	$(RM) rcapd_conf.c
91
92lint:
93	$(LINT.c) $(LINTSRCS) $(LDLIBS)
94
95$(POFILE): $(POFILES)
96	$(RM) $@
97	$(CAT) $(POFILES) > $@
98
99
100ROOTUSRLIBRCAP			= $(ROOT)/usr/lib/rcap
101ROOTUSRLIBRCAP32		= $(ROOTUSRLIBRCAP)/$(MACH32)
102ROOTUSRLIBRCAP64		= $(ROOTUSRLIBRCAP)/$(MACH64)
103ROOTUSRLIBRCAPPROG		= $(ROOTUSRLIBRCAP)/$(PROG)
104ROOTUSRLIBRCAPPROG32		= $(ROOTUSRLIBRCAP32)/$(PROG)
105ROOTUSRLIBRCAPPROG64		= $(ROOTUSRLIBRCAP64)/$(PROG)
106$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) %
107	$(INS.file)
108$(ROOTUSRLIBRCAP32)/%: $(ROOTUSRLIBRCAP32) %
109	$(INS.file)
110$(ROOTUSRLIBRCAP64)/%: $(ROOTUSRLIBRCAP64) %
111	$(INS.file)
112
113include ../../../Makefile.targ
114