xref: /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/desktop/nonpicl/Makefile (revision 689b9301078f0c35c7f198fcee8032a0d30eff3a)
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
40
41#
42# desktop platform library should install into SUNW,Ultra-2. All other desktop
43# platforms can link to /usr/platform/SUNW,Ultra-2/lib/libprtdiag_psr.so
44#
45PLATFORM=SUNW,Ultra-2
46
47#
48# For all other sun4u platforms NOT delivered by ON (ie. delivered by SME or
49# external hardware vendors) we add a default library in
50# /usr/platform/sun4u/lib so that prtdiag will default to using the desktop
51# library for any of these platforms. (this will be a link to
52# ../../SUNW,Ultra-2/lib
53#
54DEF_PLATFORM=sun4u
55USR_DEF_PSM_LIB_DIR=$(USR_PLAT_DIR)/$(DEF_PLATFORM)/lib
56USR_DEF_PSM_LIBS=$(LIBS:%=$(USR_DEF_PSM_LIB_DIR)/%)
57
58$(USR_PLAT_DIR)/$(PLATFORM)/lib/libprtdiag_psr.so.1 := FILEMODE= 0755
59
60.KEEP_STATE:
61
62PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/
63
64install:	all $(USR_PSM_LIBS) $(USR_DEF_PSM_LIBS)
65
66#
67# install rules for SUNW,Ultra-2/lib/libprtdiag_psr.so.1
68#
69$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
70	$(INS.file)
71
72$(USR_PSM_LIB_DIR):
73	cd $(UTSBASE)/sun4u; $(MAKE) $(USR_PSM_LIB_DIR)
74
75#
76# install rules for sun4u/lib/libprtdiag_psr.so.1
77#
78$(USR_DEF_PSM_LIB_DIR)/%: % $(USR_DEF_PSM_LIB_DIR)
79	$(RM) -r $@; \
80	$(SYMLINK) ../../$(PLATFORM)/lib/libprtdiag_psr.so.1 $@
81
82$(USR_DEF_PSM_LIB_DIR):
83	cd $(UTSBASE)/sun4u; $(MAKE) $(USR_DEF_PSM_LIB_DIR)
84
85
86#
87# Rules for making message files
88#
89POFILE=		libprtdiag_psr_desktop.po
90POFILES=	desktop.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/desktop.c`
103	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
104	$(RM) messages.po
105
106