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