xref: /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/desktop/nonpicl/Makefile (revision 23524732d002da91177f82bdfa44378749661577)
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.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