xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile (revision 38aced4fb3d60e34a44207b22d0b0dd4909bf4d1)
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
49CLOBBERFILES += $(LIBLINKS)
50CSTYLE    = cstyle -p -P
51HDRCHK    = hdrchk
52
53CPPFLAGS +=	-I$(SRC)/lib/libfru/include
54CPPFLAGS +=	-I$(SRC)/lib/libfruutils/
55CFLAGS +=	$(CCVERBOSE) -DBIG_ENDIAN
56LDLIBS +=	-L$(SRC)/lib/libfruutils/$(MACH)
57LDLIBS +=	-lc -lpicltree -lfruutils
58LDLIBS +=	-ldevinfo
59LDLIBS +=	-Wl,-f/opt/SUNWSMS/lib/$(DYNLIBPSR)     #  SMS before platform
60LDLIBS +=	-Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR)
61
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)
74
75all:  $(DYNLIB) $(LIBLINKS) $(CONF)
76
77install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
78
79_msg:	$(MSGDOMAIN) $(POFILE)
80	$(RM) $(MSGDOMAIN)/$(POFILE)
81	$(CP) $(POFILE) $(MSGDOMAIN)
82
83$(POFILE):
84	$(RM) $@ messages.po
85	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
86	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
87	$(RM) messages.po
88
89$(MSGDOMAIN):
90	$(INS.dir)
91
92$(LIBLINKS):	FRC
93	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
94
95check-style:
96	$(CSTYLE) *.cc *.c *.h
97	$(HDRCHK) *.h
98
99# include library targets
100include $(SRC)/cmd/picl/plugins/Makefile.targ
101include $(SRC)/lib/Makefile.targ
102
103lint :
104
105$(SUBDIRS): FRC
106	@cd $@; pwd; $(MAKE) $(TARGET)
107
108FRC:
109