xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile (revision 2722387f30847b828b57ba9ca59d2b47ee9244ec)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#pragma ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28# cmd/picl/plugins/sun4u/lib/fruaccess/Makefile
29#
30LIBRARY=	libfruaccess.a
31VERS=		.1
32OBJECTS=	fru_access.o cvrt_spd_data.o crcutils.o crcmodel.o
33
34# include library definitions
35include $(SRC)/Makefile.psm
36include $(SRC)/lib/Makefile.lib
37
38ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4u
39
40include $(SRC)/cmd/picl/plugins/Makefile.com
41
42SRCS=		$(OBJECTS:%.o=%.c)
43
44LIBS=		$(DYNLIB)
45
46ROOTLIBDIR      = $(ROOT_PLATFORM)/lib
47ROOTLIBDIR      := OWNER = root
48ROOTLIBDIR      := GROUP = sys
49
50CONF = 		fru_container.conf
51ROOTCONF=       $(CONF:%=$(ROOTLIBDIR)/%)
52$(ROOTCONF)	:= FILEMODE = 0644
53
54
55CLEANFILES=	$(LINTOUT) $(LINTLIB)
56CLOBBERFILES += $(LIBLINKS)
57CSTYLE    = cstyle -p -P
58HDRCHK    = hdrchk
59
60
61CPPFLAGS +=	-I$(SRC)/lib/libfru/include
62CPPFLAGS +=	-I$(SRC)/lib/libfruutils/
63CFLAGS +=	$(CCVERBOSE) -DBIG_ENDIAN
64LDLIBS +=	-L$(SRC)/lib/libfruutils/$(MACH)
65LDLIBS +=	-lc -lpicltree -lfruutils
66LDLIBS +=	-ldevinfo
67LDLIBS +=	-Wl,-f/opt/SUNWSMS/lib/$(DYNLIBPSR)     #  SMS before platform
68LDLIBS +=	-Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR)
69
70.KEEP_STATE:
71
72
73SUBDIRS=
74
75all :=		TARGET= all
76install :=	TARGET= install
77clean :=	TARGET= clean
78clobber :=	TARGET= clobber
79lint :=		TARGET= lint
80_msg :=		TARGET= _msg
81
82LN = ln -s
83
84POFILE=		$(LIBRARY:.a=.po)
85
86all:  $(DYNLIB) $(LIBLINKS) $(CONF)
87
88install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
89
90_msg:	$(MSGDOMAIN) $(POFILE)
91	$(RM) $(MSGDOMAIN)/$(POFILE)
92	$(CP) $(POFILE) $(MSGDOMAIN)
93
94$(POFILE):
95	$(RM) $@ messages.po
96	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
97	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
98	$(RM) messages.po
99
100$(MSGDOMAIN):
101	$(INS.dir)
102
103$(LIBLINKS):	FRC
104	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
105
106check-style:
107	$(CSTYLE) *.cc *.c *.h
108	$(HDRCHK) *.h
109
110# include library targets
111include $(SRC)/cmd/picl/plugins/Makefile.targ
112include $(SRC)/lib/Makefile.targ
113
114lint :
115	$(LINT.c) -m $(SRCS)
116
117$(SUBDIRS): FRC
118	@cd $@; pwd; $(MAKE) $(TARGET)
119
120FRC:
121