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