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