xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile (revision 99ea293e719ac006d413e4fde6ac0d5cd4dd6c59)
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
26LIBRARY=	libpiclfrudata.a
27VERS=		.1
28OBJECTS=	fru_data.o
29
30# include library definitions
31include $(SRC)/Makefile.psm
32include $(SRC)/lib/Makefile.lib
33
34ROOT_PLATFORM =	$(USR_PLAT_DIR)/sun4u
35
36include $(SRC)/cmd/picl/plugins/Makefile.com
37
38LIBLINKS=	libpiclfrudata.so
39
40SRCS=		$(OBJECTS:%.o=%.c)
41
42LIBS =		$(DYNLIB)
43
44ROOTLIBDIR =	$(ROOT_PLAT_PLUGINDIR)
45
46CLOBBERFILES += $(LIBLINKS)
47CSTYLE	=	cstyle -p -P
48HDRCHK	=	hdrchk
49
50
51CPPFLAGS +=	-I$(SRC)/lib/libfru/include -I../lib/fruaccess
52CPPFLAGS +=	-I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
53CPPFLAGS +=	-I$(SRC)/lib/libfruutils/
54CFLAGS +=	$(CCVERBOSE)
55LDLIBS +=	-L$(SRC)/cmd/picl/plugins/sun4u/lib/fruaccess
56LDLIBS +=	-L$(SRC)/lib/libfruutils/$(MACH)
57LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/frutree
58LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
59LDLIBS +=	-lc -lnvpair -lfruutils
60LDLIBS +=	-lpicltree -lpiclfrutree -lfruaccess -lpicld_pluginutil
61LDLIBS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/\$$PLATFORM/lib:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib
62.KEEP_STATE:
63
64
65SUBDIRS=
66
67all :=		TARGET= all
68install :=	TARGET= install
69clean :=	TARGET= clean
70clobber :=	TARGET= clobber
71_msg :=		TARGET= _msg
72
73POFILE=		$(LIBRARY:.a=.po)
74POFILES=	frudata.po
75
76all:  $(LIBS) $(LIBLINKS) $(CONF)
77
78install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
79
80check-style :
81	$(CSTYLE) *.c *.h
82	$(HDRCHK) *.h
83
84_msg:	$(MSGDOMAIN) $(POFILE)
85	$(RM) $(MSGDOMAIN)/$(POFILE)
86	$(CP) $(POFILE) $(MSGDOMAIN)
87
88$(MSGDOMAIN):
89	$(INS.dir)
90
91$(POFILE): .WAIT $(POFILES)
92	$(RM) $@
93	$(CAT) $(POFILES) > $@
94
95$(POFILES):
96	$(RM) messages.po
97	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
98	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
99	$(RM) messages.po
100
101$(LIBLINKS):	FRC
102	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
103
104# include library targets
105include $(SRC)/cmd/picl/plugins/Makefile.targ
106include $(SRC)/lib/Makefile.targ
107
108lint :
109
110$(SUBDIRS): FRC
111	@cd $@; pwd; $(MAKE) $(TARGET)
112
113FRC:
114