xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile (revision defc4c8acfa01dba1ef3c13ca0cafccfcede51c0)
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
57LINTSRC =	$(LINTLIB:%.ln=%)
58ROOTLINTDIR =	$(ROOTLIBDIR)
59ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
60
61CLEANFILES=	$(LINTOUT) $(LINTLIB)
62CLOBBERFILES += $(LIBLINKS)
63
64DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree
65DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
66LDLIBS +=       -L$(DEVTREE_SRC_DIR)
67LDLIBS +=	-L$(SRC)/lib/libptree/$(MACH)
68LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
69LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
70LDLIBS +=	-lc -lpicldevtree -lpicltree -lnvpair
71
72.KEEP_STATE:
73
74SUBDIRS=
75
76POFILE=	piclfrutree.po
77
78all :=		TARGET= all
79install :=	TARGET= install
80clean :=	TARGET= clean
81clobber :=	TARGET= clobber
82lint :=		TARGET= lint
83_msg :=		TARGET= _msg
84
85all: $(LIBS) $(LIBLINKS) $(CONF)
86
87install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
88
89_msg:	$(MSGDOMAIN) $(POFILE)
90	$(RM) $(MSGDOMAIN)/$(POFILE)
91	$(CP) $(POFILE) $(MSGDOMAIN)/dak_$(POFILE)
92
93$(MSGDOMAIN):
94	$(INS.dir)
95
96$(LIBLINKS):	FRC
97	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
98
99# include library targets
100include $(SRC)/lib/Makefile.targ
101include $(SRC)/cmd/picl/plugins/Makefile.targ
102
103$(ROOTLINTDIR)/%: ../%
104	$(INS.file)
105
106lint :
107	$(LINT.c) $(SRCS)
108
109$(SUBDIRS): FRC
110	@cd $@; pwd; $(MAKE) $(TARGET)
111
112$(CONF): $(INFOS)
113	$(RM) $@
114	$(CPP) piclfrutree.info >$@
115
116FRC:
117