xref: /titanic_50/usr/src/lib/libprtdiag_psr/sparc/snowbird/Makefile (revision c77a61a72b5ecdc507d6cf104142edd371a16c84)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# lib/libprtdiag_psr/sparc/snowbird/Makefile
28#
29# Need to make libctsmc library first.
30#
31LIBCTSMC = ../../../../../src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc
32all: ctsmclib
33ctsmclib: $(LIBCTSMC)/libctsmc.c $(LIBCTSMC)/smclib.h
34	cd $(LIBCTSMC); $(MAKE)
35
36LIBBASE   = ../../../../../src/lib
37UTSBASE   = ../../../../uts
38SUN4U_INC_BASE = $(UTSBASE)/sun4u/sys
39SB_INC_BASE =  $(UTSBASE)/sun4u/snowbird/sys
40
41PLATFORM_OBJECTS= snowbird.o
42
43include ../Makefile.com
44
45IFLAGS = -I$(USR_PLAT_DIR)/sun4u/include -I../../../libprtdiag/inc -I$(LIBBASE)/libdevinfo
46IFLAGS += -I$(SUN4U_INC_BASE) -I$(SB_INC_BASE) -I$(SRC)/cmd/picl/plugins/inc
47IFLAGS += -I$(LIBCTSMC)
48LINTFLAGS += $(IFLAGS)
49LDLIBS += -L$(LIBCTSMC)
50LDLIBS += -L$(LIBBASE)/libdevinfo -ldevinfo -L$(LIBBASE)/libcfgadm \
51		 -lcfgadm -lpicl -lctsmc
52DYNFLAGS += -R/usr/platform/SUNW,Netra-CP2300/lib
53
54
55#
56# SUNW,Netra-CP2300 platform can link to
57# /usr/platform/SUNW,Netra-CP2300/lib/libprtdiag_psr.so
58#
59PLATFORM=SUNW,Netra-CP2300
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