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