xref: /titanic_51/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile (revision 15d9d0b528387242011cdcc6190c9e598cfe3a07)
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# cmd/picl/plugins/sun4u/envmon/Makefile
29#
30include	$(SRC)/Makefile.psm
31
32LIBRARY=	libpiclenvmon.a
33VERS=		.1
34
35OBJECTS=	piclenvmon.o
36
37# include library definitions
38include $(SRC)/lib/Makefile.lib
39
40ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4u
41
42include	$(SRC)/cmd/picl/plugins/Makefile.com
43
44SRCS=		$(OBJECTS:%.o=%.c)
45
46LIBS =		$(DYNLIB)
47
48ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
49ROOTLIBDIR	:= OWNER = root
50ROOTLIBDIR	:= GROUP = sys
51
52LINTSRC =	$(LINTLIB:%.ln=%)
53ROOTLINTDIR =	$(ROOTLIBDIR)
54ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
55
56CLEANFILES=	$(LINTOUT) $(LINTLIB)
57
58CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
59CPPFLAGS +=	-I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
60CPPFLAGS +=	-D_REENTRANT
61CFLAGS +=	$(CCVERBOSE)
62LINTFLAGS =	-uxmn -I.. -I$(SRC)/lib/libpicl -I$(SRC)/lib/libpicltree
63DYNFLAGS +=	-R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
64LDLIBS +=	-L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
65LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
66LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/piclevent
67LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/memcfg
68LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
69LDLIBS +=	-lnvpair -ldevinfo -lc
70LDLIBS +=	-lpicltree -lpicld_pluginutil -lpiclevent -lpicldevtree
71
72.KEEP_STATE:
73
74SUBDIRS=
75
76all :=		TARGET= all
77install :=	TARGET= install
78clean :=	TARGET= clean
79clobber :=	TARGET= clobber
80lint :=		TARGET= lint
81_msg :=		TARGET= _msg
82
83POFILE =	piclenvmon_sun4u.po
84POFILES =	$(SRCS:%.c=%.po)
85
86all: $(LIBS) $(LIBLINKS)
87
88install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
89
90$(POFILE):	$(POFILES)
91	$(CAT) $(POFILES) > $(POFILE)
92
93_msg:	$(MSGDOMAIN) $(POFILE)
94	$(RM) $(MSGDOMAIN)/$(POFILE)
95	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
96
97$(MSGDOMAIN):
98	$(INS.dir)
99
100
101$(LIBLINKS):	FRC
102	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
103
104# include library targets
105include $(SRC)/lib/Makefile.targ
106include	$(SRC)/cmd/picl/plugins/Makefile.targ
107
108$(ROOTLINTDIR)/%: ../%
109	$(INS.file)
110
111lint:
112	$(LINT.c) $(SRCS)
113
114$(SUBDIRS): FRC
115	@cd $@; pwd; $(MAKE) $(TARGET)
116
117FRC:
118
119