xref: /titanic_41/usr/src/lib/libprtdiag_psr/sparc/snowbird/Makefile (revision 450396635f70344c58b6b1e4db38cf17ff34445c)
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# lib/libprtdiag_psr/sparc/snowbird/Makefile
26#
27# Need to make libctsmc library first.
28#
29LIBCTSMC = ../../../../../src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc
30all: ctsmclib
31ctsmclib: $(LIBCTSMC)/libctsmc.c $(LIBCTSMC)/smclib.h
32	cd $(LIBCTSMC); $(MAKE)
33
34LIBBASE   = ../../../../../src/lib
35UTSBASE   = ../../../../uts
36SUN4U_INC_BASE = $(UTSBASE)/sun4u/sys
37SB_INC_BASE =  $(UTSBASE)/sun4u/snowbird/sys
38
39PLATFORM_OBJECTS= snowbird.o
40
41include ../Makefile.com
42
43IFLAGS = -I$(USR_PLAT_DIR)/sun4u/include -I../../../libprtdiag/inc -I$(LIBBASE)/libdevinfo
44IFLAGS += -I$(SUN4U_INC_BASE) -I$(SB_INC_BASE) -I$(SRC)/cmd/picl/plugins/inc
45IFLAGS += -I$(LIBCTSMC)
46LINTFLAGS += $(IFLAGS)
47LDLIBS += -L$(LIBCTSMC)
48LDLIBS += -L$(LIBBASE)/libdevinfo -ldevinfo -L$(LIBBASE)/libcfgadm \
49		 -lcfgadm -lpicl -lctsmc
50DYNFLAGS += -R/usr/platform/SUNW,Netra-CP2300/lib
51
52
53#
54# SUNW,Netra-CP2300 platform can link to
55# /usr/platform/SUNW,Netra-CP2300/lib/libprtdiag_psr.so
56#
57PLATFORM=SUNW,Netra-CP2300
58
59$(USR_PLAT_DIR)/$(PLATFORM)/lib/libprtdiag_psr.so.1 := FILEMODE= 0755
60
61.KEEP_STATE:
62
63PLATLIBS= $(PLATFORM:%=$(USR_PLAT_DIR)/%/lib/)
64
65install:	all $(PLATLIBS) $(USR_PSM_LIBS)
66
67#
68# install rules for SUNW,Netra-CP2300/lib/libprtdiag_psr.so
69#
70$(PLATLIBS):
71	$(INS.dir)
72
73$(USR_PSM_LIB_DIR):
74	cd $(UTSBASE)/sun4u/snowbird; $(MAKE) $(USR_PSM_LIB_DIR)
75
76$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
77	$(INS.file)
78
79# New additions to generate msg file
80POFILE =	libprtdiag_psr_snowbird.po
81POFILES =	snowbird.po
82
83_msg:	$(MSGDOMAIN) $(POFILE)
84	$(RM) $(MSGDOMAIN)/$(POFILE)
85	$(CP) $(POFILE) $(MSGDOMAIN)
86
87$(POFILE):	$(POFILES)
88		$(RM) $@
89		$(CAT) $(POFILES) > $@
90
91$(POFILES):
92	$(RM) messages.po
93	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext common/snowbird.c`
94	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
95	$(RM) messages.po
96