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