xref: /titanic_52/usr/src/cmd/rcap/rcapd/Makefile.rcapd (revision 749f21d359d8fbd020c974a1a5227316221bfc9c)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29.KEEP_STATE:
30.SUFFIXES:
31
32#
33# subdirs must define COMMON_DIR and include Makefile.com
34#
35
36SRCS =	rcapd_main.c \
37	rcapd_collection.c \
38	rcapd_collection_project.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_mapping.c \
49	../rcapd_rfd.c \
50	../rcapd_scanner.c \
51	$(COMMON_DIR)/rcapd_stat.c \
52	$(COMMON_DIR)/utils.c
53
54$(NOT_RELEASE_BUILD)CPPFLAGS 	+= -DDEBUG
55CPPFLAGS			+= -DDEBUG_MSG
56CPPFLAGS 			+= -I$(COMMON_DIR)
57LDLIBS 				+= -lkstat -ll -lproc -lproject -lrt -lumem
58LDLIBS				+= $(EXTRA_LDLIBS)
59
60LINTFLAGS			+= -u
61LINTFLAGS64			+= -u
62
63PROG =			rcapd
64OBJS =			$(SRCS:%.c=%.o) rcapd_conf.o
65
66POFILES =		$(OBJS:%.o=%.po)
67POFILE =		$(PROG).po
68
69CLOBBERFILES +=		$(POFILES) $(POFILE)
70
71.NO_PARALLEL:
72.PARALLEL: $(OBJS)
73
74all: $(PROG)
75
76$(PROG): $(OBJS)
77	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
78	$(POST_PROCESS)
79
80%.o: ../%.c
81	$(COMPILE.c) $<
82%.po: ../%.c
83	$(COMPILE.cpp) $< > $<.i
84	$(BUILD.po)
85
86
87clean:
88	$(RM) $(OBJS)
89	$(RM) rcapd_conf.c
90
91lint:
92	$(LINT.c) $(LINTSRCS) $(LDLIBS)
93
94$(POFILE): $(POFILES)
95	$(RM) $@
96	$(CAT) $(POFILES) > $@
97
98
99ROOTUSRLIBRCAP			= $(ROOT)/usr/lib/rcap
100ROOTUSRLIBRCAP32		= $(ROOTUSRLIBRCAP)/$(MACH32)
101ROOTUSRLIBRCAP64		= $(ROOTUSRLIBRCAP)/$(MACH64)
102ROOTUSRLIBRCAPPROG		= $(ROOTUSRLIBRCAP)/$(PROG)
103ROOTUSRLIBRCAPPROG32		= $(ROOTUSRLIBRCAP32)/$(PROG)
104ROOTUSRLIBRCAPPROG64		= $(ROOTUSRLIBRCAP64)/$(PROG)
105$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) %
106	$(INS.file)
107$(ROOTUSRLIBRCAP32)/%: $(ROOTUSRLIBRCAP32) %
108	$(INS.file)
109$(ROOTUSRLIBRCAP64)/%: $(ROOTUSRLIBRCAP64) %
110	$(INS.file)
111
112include ../../../Makefile.targ
113