xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile (revision 4f364e7c95ee7fd9d5bbeddc1940e92405bb0e72)
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
56LINTSRC =	$(LINTLIB:%.ln=%)
57ROOTLINTDIR =	$(ROOTLIBDIR)
58ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
59
60CLEANFILES=	$(LINTOUT) $(LINTLIB)
61CLOBBERFILES += $(LIBLINKS)
62
63DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree
64DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
65LDLIBS +=       -L$(DEVTREE_SRC_DIR)
66LDLIBS +=	-L$(SRC)/lib/libptree/$(MACH)
67LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
68LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
69LDLIBS +=	-lc -lpicldevtree -lpicltree -lnvpair
70
71.KEEP_STATE:
72
73SUBDIRS=
74
75POFILE=	piclfrutree.po
76
77all :=		TARGET= all
78install :=	TARGET= install
79clean :=	TARGET= clean
80clobber :=	TARGET= clobber
81lint :=		TARGET= lint
82_msg :=		TARGET= _msg
83
84all: $(LIBS) $(LIBLINKS) $(CONF)
85
86install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
87
88_msg:	$(MSGDOMAIN) $(POFILE)
89	$(RM) $(MSGDOMAIN)/$(POFILE)
90	$(CP) $(POFILE) $(MSGDOMAIN)/cstone_$(POFILE)
91
92$(MSGDOMAIN):
93	$(INS.dir)
94
95$(LIBLINKS):	FRC
96	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
97
98# include library targets
99include $(SRC)/lib/Makefile.targ
100include $(SRC)/cmd/picl/plugins/Makefile.targ
101
102$(ROOTLINTDIR)/%: ../%
103	$(INS.file)
104
105lint :
106	$(LINT.c) $(SRCS)
107
108$(SUBDIRS): FRC
109	@cd $@; pwd; $(MAKE) $(TARGET)
110
111$(CONF): $(INFOS)
112	$(RM) $@
113	$(CPP) piclfrutree.info >$@
114
115FRC:
116