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# cmd/picl/plugins/sun4u/taco/envd/Makefile
26#
27include	$(SRC)/Makefile.psm
28
29LIBRARY=	libpiclenvd.a
30VERS=		.1
31
32OBJECTS=	piclenvd.o piclenvsetup.o
33
34# include library definitions
35include $(SRC)/lib/Makefile.lib
36
37ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1500
38
39include	$(SRC)/cmd/picl/plugins/Makefile.com
40
41CPPFLAGS +=	-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
42CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
43CPPFLAGS +=	-I$(SRC)/uts/sun4u/taco
44CPPFLAGS +=     -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
45
46SRCS=		$(OBJECTS:%.o=%.c)
47
48LIBS =		$(DYNLIB)
49
50ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
51
52CONF=           envmodel.conf
53ROOTCONF=       $(CONF:%=$(ROOTLIBDIR)/%)
54$(ROOTCONF)	:= FILEMODE = 0644
55INFOS=          envmodel.info
56
57CLEANFILES=	$(LINTOUT)
58
59CFLAGS +=	$(CCVERBOSE)
60DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
61LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
62LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
63LDLIBS +=       -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
64LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -lpicltree
65LDLIBS +=       -lpicld_pluginutil
66LDLIBS +=	-lc
67
68.KEEP_STATE:
69
70SUBDIRS=
71
72POFILE =	piclenvd_taco.po
73POFILES =	$(SRCS:%.c=%.po)
74
75all :=		TARGET= all
76install :=	TARGET= install
77clean :=	TARGET= clean
78clobber :=	TARGET= clobber
79_msg :=		TARGET= _msg
80
81all: $(LIBS) $(LIBLINKS) $(CONF)
82
83install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
84
85$(CONF): $(INFOS)
86	$(RM) $@
87	$(CPP) envmodel.info > $@
88
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
108lint:
109
110$(SUBDIRS): FRC
111	@cd $@; pwd; $(MAKE) $(TARGET)
112
113FRC:
114