xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile (revision cd61ae21816e53b94bc1673f3f1aa651fc3115e8)
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
73LN = ln -s
74
75POFILE=		$(LIBRARY:.a=.po)
76
77all:  $(DYNLIB) $(LIBLINKS) $(CONF)
78
79install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
80
81_msg:	$(MSGDOMAIN) $(POFILE)
82	$(RM) $(MSGDOMAIN)/$(POFILE)
83	$(CP) $(POFILE) $(MSGDOMAIN)
84
85$(POFILE):
86	$(RM) $@ messages.po
87	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
88	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
89	$(RM) messages.po
90
91$(MSGDOMAIN):
92	$(INS.dir)
93
94$(LIBLINKS):	FRC
95	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
96
97check-style:
98	$(CSTYLE) *.cc *.c *.h
99	$(HDRCHK) *.h
100
101# include library targets
102include $(SRC)/cmd/picl/plugins/Makefile.targ
103include $(SRC)/lib/Makefile.targ
104
105lint :
106
107$(SUBDIRS): FRC
108	@cd $@; pwd; $(MAKE) $(TARGET)
109
110FRC:
111