xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile (revision fb3fb4f3d76d55b64440afd0af72775dfad3bd1d)
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# cmd/picl/plugins/sun4u/enchilada/envd/Makefile
29#
30include	$(SRC)/Makefile.psm
31
32LIBRARY=	libpiclenvd.a
33VERS=		.1
34
35OBJECTS=	piclenvd.o piclenvsetup.o
36
37# include library definitions
38include $(SRC)/lib/Makefile.lib
39
40ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-2500
41
42include	$(SRC)/cmd/picl/plugins/Makefile.com
43
44CPPFLAGS +=	-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
45CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
46CPPFLAGS +=	-I$(SRC)/uts/sun4u/enchilada
47CPPFLAGS +=     -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
48
49SRCS=		$(OBJECTS:%.o=%.c)
50
51LIBS =		$(DYNLIB)
52
53ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
54ROOTLIBDIR	:= OWNER = root
55ROOTLIBDIR	:= GROUP = sys
56
57CONF=           envmodel.conf
58ROOTCONF=       $(CONF:%=$(ROOTLIBDIR)/%)
59$(ROOTCONF)	:= FILEMODE = 0644
60INFOS=          envmodel.info
61
62LINTSRC =	$(LINTLIB:%.ln=%)
63ROOTLINTDIR =	$(ROOTLIBDIR)
64ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
65
66CLEANFILES=	$(LINTOUT) $(LINTLIB)
67
68CFLAGS +=	$(CCVERBOSE)
69DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
70LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
71LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
72LDLIBS +=       -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
73LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
74LDLIBS +=       -lpicld_pluginutil
75LDLIBS +=	-ldevinfo -lc
76
77.KEEP_STATE:
78
79SUBDIRS=
80
81POFILE =	piclenvd_enchilada.po
82POFILES =	$(SRCS:%.c=%.po)
83
84all :=		TARGET= all
85install :=	TARGET= install
86clean :=	TARGET= clean
87clobber :=	TARGET= clobber
88lint :=		TARGET= lint
89_msg :=		TARGET= _msg
90
91all: $(LIBS) $(CONF) $(LIBLINKS)
92
93install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
94
95$(CONF): $(INFOS)
96	$(RM) $@
97	$(CPP) envmodel.info > $@
98
99
100$(POFILE):	$(POFILES)
101	$(CAT) $(POFILES) > $(POFILE)
102
103_msg:	$(MSGDOMAIN) $(POFILE)
104	$(RM) $(MSGDOMAIN)/$(POFILE)
105	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
106
107$(MSGDOMAIN):
108	$(INS.dir)
109
110
111$(LIBLINKS):	FRC
112	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
113
114# include library targets
115include $(SRC)/lib/Makefile.targ
116include	$(SRC)/cmd/picl/plugins/Makefile.targ
117
118$(ROOTLINTDIR)/%: ../%
119	$(INS.file)
120
121lint:
122	$(LINT.c) $(SRCS)
123
124$(SUBDIRS): FRC
125	@cd $@; pwd; $(MAKE) $(TARGET)
126
127FRC:
128