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