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