xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
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
26LIBRARY=	libpiclsbl.a
27VERS=		.1
28
29OBJECTS=	piclsbl.o
30
31# include library definitions
32include $(SRC)/lib/Makefile.lib
33include $(SRC)/Makefile.psm
34
35include $(SRC)/cmd/picl/plugins/Makefile.com
36
37SRCS=		$(OBJECTS:%.o=%.c)
38
39$(OBJS_DIR)/%.o:		$(SRC)/sun4v/piclsbl/%.c
40	$(COMPILE.c) -o $@ $<
41	$(CTFCONVERT_O)
42
43LIBS =		$(DYNLIB)
44
45ROOT_PLATFORM =		$(USR_PLAT_DIR)/sun4v
46DYNFLAGS_PLAT =		/usr/platform/\$$PLATFORM/lib/picl/plugins
47DYNFLAGS_SUN4V =	/usr/platform/sun4v/lib/picl/plugins
48DYNFLAGS_COM =		/usr/lib/picl/plugins
49ROOTLIBDIR =		$(ROOT_PLAT_PLUGINDIR)
50
51CPPFLAGS +=	-I$(SRC)/sun4v/piclsbl
52CPPFLAGS +=	-I$(SRC)/uts/common/sys
53CPPFLAGS +=	-I$(SRC)/lib/libpcp/common
54CPPFLAGS +=	-D_REENTRANT
55
56CFLAGS +=	$(CCVERBOSE)
57LDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
58LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
59DYNFLAGS +=	-R$(DYNFLAGS_COM)
60
61LDLIBS +=	-lc -lpicltree -lumem -lnvpair
62
63.KEEP_STATE:
64
65all: $(LIBS) $(LIBLINKS)
66
67install:	all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
68
69$(ROOTLIBDIR)/$(LIBS) :	$(LIBS)
70	$(RM) -r $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(LIBS)
71
72$(LIBLINKS):	FRC
73	$(RM) -r $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
74
75# include library targets
76include $(SRC)/cmd/picl/plugins/Makefile.targ
77include $(SRC)/lib/Makefile.targ
78
79lint :
80
81FRC:
82