xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile (revision cbab2b2687744cbfdc12fae90f8088127a0b266c)
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#
23# Copyright 2006 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,Netra-T12
40
41include	$(SRC)/cmd/picl/plugins/Makefile.com
42
43CPPFLAGS +=	-D_REENTRANT -I$(SRC)/uts/sun4u/serengeti
44CPPFLAGS +=	-I$(SRC)/uts/sun4u/serengeti
45CPPFLAGS +=	-I$(SRC)/uts/sun4u/lw8
46CPPFLAGS +=	-I$(SRC)/uts/sun4u -I$(CLOSED)/uts/sun4u
47CPPFLAGS +=	-I$(SRC)/uts/common -I$(CLOSED)/uts/common
48
49SRCS =		$(OBJECTS:%.o=%.c)
50
51LIBS =		$(DYNLIB)
52
53ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
54ROOTLIBDIR	:= OWNER = root
55ROOTLIBDIR	:= GROUP = sys
56
57LINTSRC =	$(LINTLIB:%.ln=%)
58ROOTLINTDIR =	$(ROOTLIBDIR)
59ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
60
61CLEANFILES =	$(LINTOUT) $(LINTLIB)
62
63
64CPPFLAGS +=	-D_SGFRU
65CFLAGS +=	$(CCVERBOSE)
66DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
67LDLIBS +=	-L$(DEVTREE_SRC_DIR)
68LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
69LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
70LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
71LDLIBS +=	-lc -lpicldevtree -lpiclmemcfg
72LDLIBS +=	-lpicltree -lnvpair -lkstat -ldevice
73
74.KEEP_STATE:
75
76SUBDIRS =
77
78POFILE = piclfrutree.po
79
80all :=		TARGET= all
81install :=	TARGET= install
82clean :=	TARGET= clean
83clobber :=	TARGET= clobber
84lint :=		TARGET= lint
85_msg :=		TARGET= _msg
86
87all: $(LIBS) $(LIBLINKS)
88
89install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
90
91_msg:	$(MSGDOMAIN) $(POFILE)
92	$(RM) $(MSGDOMAIN)/$(POFILE)
93	$(CP) $(POFILE) $(MSGDOMAIN)/lw8_$(POFILE)
94
95$(MSGDOMAIN):
96	$(INS.dir)
97
98$(LIBLINKS):	FRC
99	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
100
101# include library targets
102include $(SRC)/lib/Makefile.targ
103include	$(SRC)/cmd/picl/plugins/Makefile.targ
104
105$(ROOTLINTDIR)/%: ../%
106	$(INS.file)
107
108lint:
109	$(LINT.c) $(SRCS)
110
111$(SUBDIRS): FRC
112	@cd $@; pwd; $(MAKE) $(TARGET)
113
114FRC:
115