xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile (revision 2983dda76a6d296fdb560c88114fe41caad1b84f)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26include	$(SRC)/Makefile.psm
27
28LIBRARY=	libpiclenvd.a
29VERS=		.1
30
31OBJECTS=	piclenvd.o piclenvsetup.o
32
33# include library definitions
34include $(SRC)/lib/Makefile.lib
35
36ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-100
37
38include	$(SRC)/cmd/picl/plugins/Makefile.com
39
40CPPFLAGS +=	-D_REENTRANT
41CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
42
43SRCS=		$(OBJECTS:%.o=%.c)
44
45LIBS =		$(DYNLIB)
46
47ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
48
49CONF=           envmodel.conf
50ROOTCONF=       $(CONF:%=$(ROOTLIBDIR)/%)
51$(ROOTCONF)	:= FILEMODE = 0644
52INFOS=          envmodel.info
53
54LINTSRC =	$(LINTLIB:%.ln=%)
55ROOTLINTDIR =	$(ROOTLIBDIR)
56ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
57
58CLEANFILES=	$(LINTOUT) $(LINTLIB)
59
60CFLAGS +=	$(CCVERBOSE)
61CPPFLAGS +=     -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
62DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
63LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
64LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
65LDLIBS +=       -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
66LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
67LDLIBS +=	-lpicld_pluginutil -lc
68
69.KEEP_STATE:
70
71SUBDIRS=
72
73POFILE =	piclenvd_grover.po
74POFILES =	$(SRCS:%.c=%.po)
75
76all :=		TARGET= all
77install :=	TARGET= install
78clean :=	TARGET= clean
79clobber :=	TARGET= clobber
80lint :=		TARGET= lint
81_msg :=		TARGET= _msg
82
83all: $(LIBS) $(LIBLINKS)
84
85install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
86
87$(CONF): $(INFOS)
88	$(RM) $@
89	$(CPP) envmodel.info > $@
90
91$(POFILE):	$(POFILES)
92	$(CAT) $(POFILES) > $(POFILE)
93
94_msg:	$(MSGDOMAIN) $(POFILE)
95	$(RM) $(MSGDOMAIN)/$(POFILE)
96	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
97
98$(MSGDOMAIN):
99	$(INS.dir)
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