xref: /titanic_50/usr/src/lib/libprtdiag_psr/sparc/montecarlo/Makefile (revision 44743693dce3212f5edba623e0cb0327bd4337a3)
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/montecarlo/Makefile
28
29LIBBASE   = ../../../../../src/lib
30UTSBASE   = ../../../../uts
31PLATFORM_OBJECTS= montecarlo.o
32
33include ../Makefile.com
34
35IFLAGS = -I$(USR_PLAT_DIR)/sun4u/include -I../../../libprtdiag/inc -I$(LIBBASE)/libdevinfo
36IFLAGS += -I$(UTSBASE)/sun4u/sys
37IFLAGS += -I$(UTSBASE)/sun4u/montecarlo/sys
38LINTFLAGS += $(IFLAGS)
39LDLIBS += -L$(LIBBASE)/libdevinfo -ldevinfo -L$(LIBBASE)/libcfgadm -lcfgadm \
40	  -lkstat
41#
42# links in /usr/platform
43#
44LINKED_PLATFORMS	= SUNW,UltraSPARC-IIe-NetraCT-40
45
46LINKED_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%)
47LINKED_LIB_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib)
48LINKED_PRTDIAG_DIRS	= \
49	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/libprtdiag_psr.so.1)
50
51#
52# SUNW,UltraSPARC-IIi-Netract and SUNW,UltraSPARC-IIe-NetraCT-40 platform
53# should install into SUNW,UltraSPARC-IIi-Netract.
54# SUNW,UltraSPARC-IIe-NetraCT-40 platform can link to
55# /usr/platform/SUNW,UltraSPARC-IIi-Netract/lib/libprtdiag_psr.so
56#
57PLATFORM=SUNW,UltraSPARC-IIi-Netract
58
59.KEEP_STATE:
60
61PLATLIBS= $(PLATFORM:%=$(USR_PLAT_DIR)/%/lib/)
62
63install:	all $(PLATLIBS) $(USR_PSM_LIBS) \
64		$(LINKED_PRTDIAG_DIRS)
65
66#
67# install rules for SUNW,UltraSPARC-IIi-Netract/lib/libprtdiag_psr.so
68#
69$(PLATLIBS):
70	$(INS.dir)
71
72$(USR_PSM_LIB_DIR):
73	cd $(UTSBASE)/sun4u/montecarlo; $(MAKE) $(USR_PSM_LIB_DIR)
74
75$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
76	$(INS.file)
77
78$(LINKED_DIRS):	$(USR_PLAT_DIR)
79	-$(INS.dir.root.sys)
80
81$(LINKED_LIB_DIRS):	$(LINKED_DIRS)
82	-$(INS.dir.root.sys)
83
84$(LINKED_PRTDIAG_DIRS):	$(LINKED_LIB_DIRS)
85	-$(INS.slink6)
86
87
88# New additions to generate msg file
89POFILE =	libprtdiag_psr_montecarlo.po
90POFILES =	montecarlo.po
91
92_msg:	$(MSGDOMAIN) $(POFILE)
93	$(RM) $(MSGDOMAIN)/$(POFILE)
94	$(CP) $(POFILE) $(MSGDOMAIN)
95
96$(POFILE):	$(POFILES)
97		$(RM) $@
98		$(CAT) $(POFILES) > $@
99
100$(POFILES):
101	$(RM) messages.po
102	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext common/montecarlo.c`
103	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
104	$(RM) messages.po
105