xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile (revision 581cede61ac9c14d8d4ea452562a567189eead78)
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
46CLEANFILES=	$(LINTOUT) $(LINTLIB)
47CLOBBERFILES += $(LIBLINKS)
48CSTYLE	=	cstyle -p -P
49HDRCHK	=	hdrchk
50
51
52CPPFLAGS +=	-I$(SRC)/lib/libfru/include -I../lib/fruaccess
53CPPFLAGS +=	-I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
54CPPFLAGS +=	-I$(SRC)/lib/libfruutils/
55CFLAGS +=	$(CCVERBOSE)
56LDLIBS +=	-L$(SRC)/cmd/picl/plugins/sun4u/lib/fruaccess
57LDLIBS +=	-L$(SRC)/lib/libfruutils/$(MACH)
58LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/frutree
59LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
60LDLIBS +=	-lc -lnvpair -lfruutils
61LDLIBS +=	-lpicltree -lpiclfrutree -lfruaccess -lpicld_pluginutil
62LDLIBS +=	-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
63.KEEP_STATE:
64
65
66SUBDIRS=
67
68all :=		TARGET= all
69install :=	TARGET= install
70clean :=	TARGET= clean
71clobber :=	TARGET= clobber
72lint :=		TARGET= lint
73_msg :=		TARGET= _msg
74
75POFILE=		$(LIBRARY:.a=.po)
76POFILES=	frudata.po
77
78all:  $(LIBS) $(LIBLINKS) $(CONF)
79
80install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS)
81
82check-style :
83	$(CSTYLE) *.c *.h
84	$(HDRCHK) *.h
85
86_msg:	$(MSGDOMAIN) $(POFILE)
87	$(RM) $(MSGDOMAIN)/$(POFILE)
88	$(CP) $(POFILE) $(MSGDOMAIN)
89
90$(MSGDOMAIN):
91	$(INS.dir)
92
93$(POFILE): .WAIT $(POFILES)
94	$(RM) $@
95	$(CAT) $(POFILES) > $@
96
97$(POFILES):
98	$(RM) messages.po
99	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
100	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
101	$(RM) messages.po
102
103$(LIBLINKS):	FRC
104	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
105
106# include library targets
107include $(SRC)/cmd/picl/plugins/Makefile.targ
108include $(SRC)/lib/Makefile.targ
109
110lint :
111	$(LINT.c) $(SRCS)
112
113$(SUBDIRS): FRC
114	@cd $@; pwd; $(MAKE) $(TARGET)
115
116FRC:
117