xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile (revision 7b34a9a5df26271af0da06974fc361c468cd48d3)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26include $(SRC)/Makefile.psm
27
28LIBRARY=	libpiclfrutree.a
29VERS=		.1
30
31OBJECTS=	piclfrutree.o
32
33# include library definitions
34include $(SRC)/lib/Makefile.lib
35
36ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R
37
38include $(SRC)/cmd/picl/plugins/Makefile.com
39
40CFLAGS +=	$(CCVERBOSE)
41CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
42CPPFLAGS +=	-I$(SRC)/lib/libdevfsevent -I$(SRC)/uts/common
43CPPFLAGS +=	-D_REENTRANT
44
45SRCS=		$(OBJECTS:%.o=%.c)
46
47LIBS =		$(DYNLIB)
48
49ROOTLIBDIR =	$(ROOT_PLAT_PLUGINDIR)
50
51CONF=		piclfrutree.conf
52ROOTCONF=	$(CONF:%=$(ROOTLIBDIR)/%)
53$(ROOTCONF)	:= FILEMODE = 0644
54INFOS=		$(CONF:%.conf=%.info)
55
56CLOBBERFILES += $(LIBLINKS)
57
58DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree
59DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
60LDLIBS +=       -L$(DEVTREE_SRC_DIR)
61LDLIBS +=	-L$(SRC)/lib/libptree/$(MACH)
62LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
63LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
64LDLIBS +=	-lc -lpicldevtree -lpicltree -lnvpair
65
66.KEEP_STATE:
67
68SUBDIRS=
69
70POFILE=	piclfrutree.po
71
72all :=		TARGET= all
73install :=	TARGET= install
74clean :=	TARGET= clean
75clobber :=	TARGET= clobber
76_msg :=		TARGET= _msg
77
78all: $(LIBS) $(LIBLINKS) $(CONF)
79
80install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
81
82_msg:	$(MSGDOMAIN) $(POFILE)
83	$(RM) $(MSGDOMAIN)/$(POFILE)
84	$(CP) $(POFILE) $(MSGDOMAIN)/cstone_$(POFILE)
85
86$(MSGDOMAIN):
87	$(INS.dir)
88
89$(LIBLINKS):	FRC
90	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
91
92# include library targets
93include $(SRC)/lib/Makefile.targ
94include $(SRC)/cmd/picl/plugins/Makefile.targ
95
96lint :
97
98$(SUBDIRS): FRC
99	@cd $@; pwd; $(MAKE) $(TARGET)
100
101$(CONF): $(INFOS)
102	$(RM) $@
103	$(CPP) piclfrutree.info >$@
104
105FRC:
106