xref: /titanic_41/usr/src/cmd/picl/plugins/sun4u/blade/bsc/Makefile (revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4)
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# cmd/picl/picl/plugins/sun4u/blade/bsc/Makefile
26#
27include	$(SRC)/Makefile.psm
28
29LIBRARY=	libpicllom.a
30VERS=		.1
31
32OBJECTS=	picllom.o
33
34# include library definitions
35include $(SRC)/lib/Makefile.lib
36
37ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Serverblade1
38
39include	$(SRC)/cmd/picl/plugins/Makefile.com
40
41SRCS=		$(OBJECTS:%.o=%.c)
42
43LIBS =		$(DYNLIB)
44
45ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
46
47CONF=           picllom.conf
48ROOTCONF=       $(CONF:%=$(ROOTLIBDIR)/%)
49$(ROOTCONF)	:= FILEMODE = 0644
50INFOS=          picllom.info
51
52LINTSRC =	$(LINTLIB:%.ln=%)
53ROOTLINTDIR =	$(ROOTLIBDIR)
54ROOTLINT =	$(LINTSRC:%=$(ROOTLINTDIR)/%)
55
56CLEANFILES=	$(LINTOUT) $(LINTLIB)
57
58CPPFLAGS +=	-I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
59CPPFLAGS +=	-I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
60CPPFLAGS +=	-D_REENTRANT
61CFLAGS +=	$(CCVERBOSE)
62LINTFLAGS =	-uxmn
63DYNFLAGS +=	-R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
64LDLIBS +=	-L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
65LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
66LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/piclevent
67LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/memcfg
68LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
69LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/frutree
70LDLIBS +=	-lpicldevtree -lpiclfrutree -lpicltree -lpicld_pluginutil
71LDLIBS +=	-ldevinfo -lc
72
73.KEEP_STATE:
74
75SUBDIRS=
76
77all :=		TARGET= all
78install :=	TARGET= install
79clean :=	TARGET= clean
80clobber :=	TARGET= clobber
81lint :=		TARGET= lint
82_msg :=		TARGET= _msg
83
84POFILE =	picllom_blade.po
85POFILES =	$(SRCS:%.c=%.po)
86
87all: $(LIBS) $(LIBLINKS) $(CONF)
88
89install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
90
91$(POFILE):	$(POFILES)
92	$(CAT) $(POFILES) > $(POFILE)
93
94_msg:	$(MSGDOMAIN) $(POFILE)
95	$(RM) $(MSGDOMAIN)/$(POFILE)
96	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
97
98$(MSGDOMAIN):
99	$(INS.dir)
100
101$(CONF): $(INFOS)
102	$(RM) $@
103	$(CPP) $(INFOS) | \
104	$(SED) -e '/^[ 	]*$$/d' -e '/^#/d' > $@
105
106$(LIBLINKS):	FRC
107	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
108
109# include library targets
110include $(SRC)/lib/Makefile.targ
111include	$(SRC)/cmd/picl/plugins/Makefile.targ
112
113$(ROOTLINTDIR)/%: ../%
114	$(INS.file)
115
116lint:
117	$(LINT.c) $(SRCS)
118
119$(SUBDIRS): FRC
120	@cd $@; pwd; $(MAKE) $(TARGET)
121
122FRC:
123
124