xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile (revision e214b19eaa16fec1fa60a97227778103f598336f)
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-1000
37
38include	$(SRC)/cmd/picl/plugins/Makefile.com
39
40CPPFLAGS +=	-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
41CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
42CPPFLAGS +=	-I$(SRC)/uts/sun4u/excalibur
43CPPFLAGS +=     -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
44
45SRCS=		$(OBJECTS:%.o=%.c)
46
47LIBS =		$(DYNLIB)
48
49ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
50
51CONF=           envmodel.conf
52ROOTCONF=       $(CONF:%=$(ROOTLIBDIR)/%)
53$(ROOTCONF)	:= FILEMODE = 0644
54INFOS=          envmodel.info
55
56CFLAGS +=	$(CCVERBOSE)
57DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
58LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
59LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
60LDLIBS +=       -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
61LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
62LDLIBS +=       -lpicld_pluginutil
63LDLIBS +=	-ldevinfo -lc
64
65.KEEP_STATE:
66
67SUBDIRS=
68
69POFILE =	piclenvd_excalibur.po
70POFILES =	$(SRCS:%.c=%.po)
71
72all :=		TARGET= all
73install :=	TARGET= install
74clean :=	TARGET= clean
75clobber :=	TARGET= clobber
76_msg :=		TARGET= _msg
77
78all: $(LIBS) $(LIBLINKS)
79
80install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
81
82$(CONF): $(INFOS)
83	$(RM) $@
84	$(CPP) envmodel.info > $@
85
86
87$(POFILE):	$(POFILES)
88	$(CAT) $(POFILES) > $(POFILE)
89
90_msg:	$(MSGDOMAIN) $(POFILE)
91	$(RM) $(MSGDOMAIN)/$(POFILE)
92	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
93
94$(MSGDOMAIN):
95	$(INS.dir)
96
97
98$(LIBLINKS):	FRC
99	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
100
101# include library targets
102include $(SRC)/lib/Makefile.targ
103include	$(SRC)/cmd/picl/plugins/Makefile.targ
104
105lint:
106
107$(SUBDIRS): FRC
108	@cd $@; pwd; $(MAKE) $(TARGET)
109
110FRC:
111