xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile (revision f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29include	$(SRC)/Makefile.psm
30
31LIBRARY=	libpiclenvd.a
32VERS=		.1
33
34OBJECTS=	piclenvd.o piclenvsetup.o
35
36# include library definitions
37include $(SRC)/lib/Makefile.lib
38
39ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1000
40
41include	$(SRC)/cmd/picl/plugins/Makefile.com
42
43CPPFLAGS +=	-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
44CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
45CPPFLAGS +=	-I$(SRC)/uts/sun4u/excalibur
46CPPFLAGS +=     -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
47
48SRCS=		$(OBJECTS:%.o=%.c)
49
50LIBS =		$(DYNLIB)
51
52ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
53ROOTLIBDIR	:= OWNER = root
54ROOTLIBDIR	:= GROUP = sys
55
56CONF=           envmodel.conf
57ROOTCONF=       $(CONF:%=$(ROOTLIBDIR)/%)
58$(ROOTCONF)	:= FILEMODE = 0644
59INFOS=          envmodel.info
60
61LINTSRC =	$(LINTLIB:%.ln=%)
62ROOTLINTDIR =	$(ROOTLIBDIR)
63ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
64
65CLEANFILES=	$(LINTOUT) $(LINTLIB)
66
67CFLAGS +=	$(CCVERBOSE)
68DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
69LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
70LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
71LDLIBS +=       -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
72LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
73LDLIBS +=       -lpicld_pluginutil
74LDLIBS +=	-ldevinfo -lc
75
76.KEEP_STATE:
77
78SUBDIRS=
79
80POFILE =	piclenvd_excalibur.po
81POFILES =	$(SRCS:%.c=%.po)
82
83all :=		TARGET= all
84install :=	TARGET= install
85clean :=	TARGET= clean
86clobber :=	TARGET= clobber
87lint :=		TARGET= lint
88_msg :=		TARGET= _msg
89
90all: $(LIBS) $(LIBLINKS)
91
92install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
93
94$(CONF): $(INFOS)
95	$(RM) $@
96	$(CPP) envmodel.info > $@
97
98
99$(POFILE):	$(POFILES)
100	$(CAT) $(POFILES) > $(POFILE)
101
102_msg:	$(MSGDOMAIN) $(POFILE)
103	$(RM) $(MSGDOMAIN)/$(POFILE)
104	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
105
106$(MSGDOMAIN):
107	$(INS.dir)
108
109
110$(LIBLINKS):	FRC
111	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
112
113# include library targets
114include $(SRC)/lib/Makefile.targ
115include	$(SRC)/cmd/picl/plugins/Makefile.targ
116
117$(ROOTLINTDIR)/%: ../%
118	$(INS.file)
119
120lint:
121	$(LINT.c) $(SRCS)
122
123$(SUBDIRS): FRC
124	@cd $@; pwd; $(MAKE) $(TARGET)
125
126FRC:
127