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