xref: /titanic_41/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile (revision e802abbda8c322f24d47835734f4a793ef15ddc8)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# cmd/picl/plugins/sun4v/piclsbl/Makefile
28
29LIBRARY=	libpiclsbl.a
30VERS=		.1
31
32OBJECTS=	piclsbl.o
33
34# include library definitions
35include $(SRC)/lib/Makefile.lib
36include $(SRC)/Makefile.psm
37
38include $(SRC)/cmd/picl/plugins/Makefile.com
39
40SRCS=		$(OBJECTS:%.o=%.c)
41
42LINT_SRC=	$(LINTLIB:%.ln=%)
43
44$(OBJS_DIR)/%.o:		$(SRC)/sun4v/piclsbl/%.c
45	$(COMPILE.c) -o $@ $<
46	$(CTFCONVERT_O)
47
48$(LINTS_DIR)/%.ln:              $(SRC)/sun4v/piclsbl/%.c
49	@($(LHEAD) $(LINT.c) $< $(LTAIL))
50
51
52LIBS =		$(DYNLIB)
53
54ROOT_PLATFORM =		$(USR_PLAT_DIR)/sun4v
55DYNFLAGS_PLAT =		/usr/platform/\$$PLATFORM/lib/picl/plugins
56DYNFLAGS_SUN4V =	/usr/platform/sun4v/lib/picl/plugins
57DYNFLAGS_COM =		/usr/lib/picl/plugins
58ROOTLIBDIR =		$(ROOT_PLAT_PLUGINDIR)
59
60CLEANFILES=	$(LINTOUT) $(LINTLIB)
61
62CPPFLAGS +=	-I$(SRC)/sun4v/piclsbl
63CPPFLAGS +=	-I$(SRC)/uts/common/sys
64CPPFLAGS +=	-I$(SRC)/lib/libpcp/common
65CPPFLAGS +=	-D_REENTRANT
66
67CFLAGS +=	$(CCVERBOSE)
68LDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
69LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
70DYNFLAGS +=	-R$(DYNFLAGS_COM)
71
72LDLIBS +=	-lc -lpicltree -lumem -lnvpair
73
74LINTFLAGS +=	-erroff=E_BAD_PTR_CAST_ALIGN -v
75
76.KEEP_STATE:
77
78all: $(LIBS) $(LIBLINKS)
79
80install:	all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
81
82$(ROOTLIBDIR)/$(LIBS) :	$(LIBS)
83	$(RM) -r $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(LIBS)
84
85$(LIBLINKS):	FRC
86	$(RM) -r $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
87
88# include library targets
89include $(SRC)/cmd/picl/plugins/Makefile.targ
90include $(SRC)/lib/Makefile.targ
91
92lint :
93	$(LINT.c) $(SRCS)
94
95FRC:
96