xref: /titanic_44/usr/src/cmd/rcap/rcapadm/Makefile (revision 45916cd2fec6e79bca5dee0421bd39e3c2910d1e)
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.KEEP_STATE:
29.SUFFIXES:
30
31include ../../Makefile.cmd
32
33COMMON_DIR=	../common	# for Makefile.com
34SRCS = 		rcapadm.c \
35		rcapd_stat.c \
36		utils.c
37
38LINTSRCS =	$(COMMON_DIR)/utils.c \
39		$(COMMON_DIR)/rcapd_stat.c \
40		rcapadm.c
41
42$(NOT_RELEASE_BUILD)CPPFLAGS 	+= -DDEBUG
43CPPFLAGS 			+= -I$(COMMON_DIR)
44LDLIBS 				+= -lumem -ll -lscf
45
46LINTFLAGS 			+= $(LDLIBS) -mnu
47
48PROG =		rcapadm
49OBJS =		$(SRCS:%.c=%.o) rcapd_conf.o
50
51POFILES =	$(OBJS:%.o=%.po)
52POFILE =	p$(PROG).po
53
54CLOBBERFILES +=	$(POFILES) $(POFILE)
55
56.NO_PARALLEL:
57.PARALLEL: $(OBJS) $(LINTFILES)
58
59all: $(PROG)
60
61include ../Makefile.com
62
63$(PROG): $(OBJS)
64	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
65	$(POST_PROCESS)
66
67$(POFILE): $(POFILES)
68	$(RM) $@
69	$(CAT) $(POFILES) > $@
70
71
72clean:
73	$(RM) $(OBJS)
74	$(RM) rcapd_conf.c
75
76%.ln: $(COMMON_DIR)/%.c
77	$(LINT.c) -c $<
78
79lint:
80	$(LINT.c) $(LINTSRCS)
81
82$(ROOTUSRSBIN):
83	$(MKDIR) -p $(ROOTUSRSBIN)
84
85install: all $(ROOTUSRSBIN) $(ROOTUSRSBINPROG)
86
87include ../../Makefile.targ
88