xref: /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/desktop/nonpicl/Makefile (revision 5801b0f01c3c34499a929ed96164a5a68b470945)
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/desktop/nonpicl/Makefile
26
27UTSBASE = $(SRC)/uts
28
29PLATFORM_OBJECTS= desktop.o
30
31objs/%.o pics/%.o: ../common/%.c
32	$(COMPILE.c) $(IFLAGS) -o $@ $<
33	$(POST_PROCESS_O)
34
35include $(SRC)/lib/libprtdiag_psr/sparc/Makefile.com
36
37SRCS=	$(OBJECTS:%.o=../common/%.c)
38
39IFLAGS += -I$(USR_PLAT_DIR)/sun4u/include -I ../../../../libprtdiag/inc
40LINTFLAGS += $(IFLAGS)
41
42#
43# desktop platform library should install into
44# SUNW,Ultra-2. All other desktop platforms can
45# link to /usr/platform/SUNW,Ultra-2/lib/libprtdiag_psr.so
46#
47PLATFORM=SUNW,Ultra-2
48
49#
50# For all other sun4u platforms NOT delivered by ON (ie. delivered
51# by SME or external hardware vendors) we add a default library in
52# /usr/platform/sun4u/lib so that prtdiag will default to using
53# the desktop library for any of these platforms. (this will be a
54# link to ../../SUNW,Ultra-2/lib
55#
56DEF_PLATFORM=sun4u
57USR_DEF_PSM_LIB_DIR=$(USR_PLAT_DIR)/$(DEF_PLATFORM)/lib
58USR_DEF_PSM_LIBS=$(LIBS:%=$(USR_DEF_PSM_LIB_DIR)/%)
59
60$(USR_PLAT_DIR)/$(PLATFORM)/lib/libprtdiag_psr.so.1 := FILEMODE= 0755
61
62.KEEP_STATE:
63
64PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/
65
66install:	all $(USR_PSM_LIBS) $(USR_DEF_PSM_LIBS)
67
68#
69# install rules for SUNW,Ultra-2/lib/libprtdiag_psr.so.1
70#
71$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
72	$(INS.file)
73
74$(USR_PSM_LIB_DIR):
75	cd $(UTSBASE)/sun4u; $(MAKE) $(USR_PSM_LIB_DIR)
76
77#
78# install rules for sun4u/lib/libprtdiag_psr.so.1
79#
80$(USR_DEF_PSM_LIB_DIR)/%: % $(USR_DEF_PSM_LIB_DIR)
81	$(RM) -r $@; \
82	$(SYMLINK) ../../$(PLATFORM)/lib/libprtdiag_psr.so.1 $@
83
84$(USR_DEF_PSM_LIB_DIR):
85	cd $(UTSBASE)/sun4u; $(MAKE) $(USR_DEF_PSM_LIB_DIR)
86
87
88#
89# Rules for making message files
90#
91POFILE=		libprtdiag_psr_desktop.po
92POFILES=	desktop.po
93
94_msg:	$(MSGDOMAIN) $(POFILE)
95	$(RM) $(MSGDOMAIN)/$(POFILE)
96	$(CP) $(POFILE) $(MSGDOMAIN)
97
98$(POFILE):	$(POFILES)
99	$(RM) $@
100	$(CAT) $(POFILES) > $@
101
102$(POFILES):
103	$(RM) messages.po
104	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../common/desktop.c`
105	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
106	$(RM) messages.po
107
108