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