xref: /titanic_41/usr/src/cmd/rcap/rcapd/Makefile.rcapd (revision 9dd828891378a0a6a509ab601b4c5c20ca5562ec)
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_mapping.c \
39	rcapd_rfd.c \
40	rcapd_scanner.c \
41	rcapd_stat.c \
42	utils.c
43
44LINTSRCS = ../rcapd_main.c \
45	../rcapd_collection.c \
46	../rcapd_collection_project.c \
47	../rcapd_mapping.c \
48	../rcapd_rfd.c \
49	../rcapd_scanner.c \
50	$(COMMON_DIR)/rcapd_stat.c \
51	$(COMMON_DIR)/utils.c
52
53$(NOT_RELEASE_BUILD)CPPFLAGS 	+= -DDEBUG
54CPPFLAGS			+= -DDEBUG_MSG
55CPPFLAGS 			+= -I$(COMMON_DIR)
56LDLIBS 				+= -lkstat -ll -lproc -lproject -lumem
57LDLIBS				+= $(EXTRA_LDLIBS)
58
59LINTFLAGS			+= -u
60LINTFLAGS64			+= -u
61
62PROG =			rcapd
63OBJS =			$(SRCS:%.c=%.o) rcapd_conf.o
64
65POFILES =		$(OBJS:%.o=%.po)
66POFILE =		$(PROG).po
67
68CLOBBERFILES +=		$(POFILES) $(POFILE)
69
70.NO_PARALLEL:
71.PARALLEL: $(OBJS)
72
73all: $(PROG)
74
75$(PROG): $(OBJS)
76	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
77	$(POST_PROCESS)
78
79%.o: ../%.c
80	$(COMPILE.c) $<
81%.po: ../%.c
82	$(COMPILE.cpp) $< > $<.i
83	$(BUILD.po)
84
85
86clean:
87	$(RM) $(OBJS)
88	$(RM) rcapd_conf.c
89
90lint:
91	$(LINT.c) $(LINTSRCS) $(LDLIBS)
92
93$(POFILE): $(POFILES)
94	$(RM) $@
95	$(CAT) $(POFILES) > $@
96
97
98ROOTUSRLIBRCAP			= $(ROOT)/usr/lib/rcap
99ROOTUSRLIBRCAP32		= $(ROOTUSRLIBRCAP)/$(MACH32)
100ROOTUSRLIBRCAP64		= $(ROOTUSRLIBRCAP)/$(MACH64)
101ROOTUSRLIBRCAPPROG		= $(ROOTUSRLIBRCAP)/$(PROG)
102ROOTUSRLIBRCAPPROG32		= $(ROOTUSRLIBRCAP32)/$(PROG)
103ROOTUSRLIBRCAPPROG64		= $(ROOTUSRLIBRCAP64)/$(PROG)
104$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) %
105	$(INS.file)
106$(ROOTUSRLIBRCAP32)/%: $(ROOTUSRLIBRCAP32) %
107	$(INS.file)
108$(ROOTUSRLIBRCAP64)/%: $(ROOTUSRLIBRCAP64) %
109	$(INS.file)
110
111include ../../../Makefile.targ
112