xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile (revision 8226594fdd4479be135127f43632f1f995074654)
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/chicago/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,A70
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/chicago
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
57CFLAGS +=	$(CCVERBOSE)
58DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
59LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
60LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
61LDLIBS +=       -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
62LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -lpicltree
63LDLIBS +=       -lpicld_pluginutil
64LDLIBS +=	-lc
65
66.KEEP_STATE:
67
68SUBDIRS=
69
70POFILE =	piclenvd_chicago.po
71POFILES =	$(SRCS:%.c=%.po)
72
73all :=		TARGET= all
74install :=	TARGET= install
75clean :=	TARGET= clean
76clobber :=	TARGET= clobber
77_msg :=		TARGET= _msg
78
79all: $(LIBS) $(CONF) $(LIBLINKS)
80
81install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
82
83$(CONF): $(INFOS)
84	$(RM) $@
85	$(CPP) envmodel.info > $@
86
87
88$(POFILE):	$(POFILES)
89	$(CAT) $(POFILES) > $(POFILE)
90
91_msg:	$(MSGDOMAIN) $(POFILE)
92	$(RM) $(MSGDOMAIN)/$(POFILE)
93	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
94
95$(MSGDOMAIN):
96	$(INS.dir)
97
98
99$(LIBLINKS):	FRC
100	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
101
102# include library targets
103include $(SRC)/lib/Makefile.targ
104include	$(SRC)/cmd/picl/plugins/Makefile.targ
105
106lint:
107
108$(SUBDIRS): FRC
109	@cd $@; pwd; $(MAKE) $(TARGET)
110
111FRC:
112