xref: /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/desktop/nonpicl/Makefile (revision f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01)
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/desktop/nonpicl/Makefile
28
29UTSBASE = $(SRC)/uts
30
31PLATFORM_OBJECTS= desktop.o
32
33objs/%.o pics/%.o: ../common/%.c
34	$(COMPILE.c) $(IFLAGS) -o $@ $<
35	$(POST_PROCESS_O)
36
37include $(SRC)/lib/libprtdiag_psr/sparc/Makefile.com
38
39SRCS=	$(OBJECTS:%.o=../common/%.c)
40
41IFLAGS += -I$(USR_PLAT_DIR)/sun4u/include -I ../../../../libprtdiag/inc
42LINTFLAGS += $(IFLAGS)
43
44#
45# desktop platform library should install into
46# SUNW,Ultra-2. All other desktop platforms can
47# link to /usr/platform/SUNW,Ultra-2/lib/libprtdiag_psr.so
48#
49PLATFORM=SUNW,Ultra-2
50
51#
52# For all other sun4u platforms NOT delivered by ON (ie. delivered
53# by SME or external hardware vendors) we add a default library in
54# /usr/platform/sun4u/lib so that prtdiag will default to using
55# the desktop library for any of these platforms. (this will be a
56# link to ../../SUNW,Ultra-2/lib
57#
58DEF_PLATFORM=sun4u
59USR_DEF_PSM_LIB_DIR=$(USR_PLAT_DIR)/$(DEF_PLATFORM)/lib
60USR_DEF_PSM_LIBS=$(LIBS:%=$(USR_DEF_PSM_LIB_DIR)/%)
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 $@ $(CHOWNLINK) $(CHGRPLINK)
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