xref: /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/desktop/picl/Makefile (revision 6bb6b5762ca4b17cd5fb3c6c123f17489d5635aa)
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/picl/Makefile
26
27UTSBASE = $(SRC)/uts
28
29PLATFORM_OBJECTS= picldiag.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
39LDLIBS += -lpicl
40
41IFLAGS += -I$(USR_PLAT_DIR)/sun4u/include -I ../../../../libprtdiag/inc
42IFLAGS += -I$(SRC)/cmd/picl/plugins/inc
43LINTFLAGS += $(IFLAGS)
44
45#
46# links in /usr/platform
47#
48LINKED_PLATFORMS	= SUNW,Sun-Blade-1000 SUNW,Netra-T4
49LINKED_PLATFORMS	+= SUNW,Sun-Blade-1500
50LINKED_PLATFORMS	+= SUNW,Sun-Blade-2500
51LINKED_PLATFORMS	+= SUNW,A70
52LINKED_PLATFORMS	+= SUNW,Sun-Fire-V445
53LINKED_PLATFORMS	+= SUNW,Sun-Fire-V215
54LINKED_PLATFORMS	+= SUNW,Serverblade1
55LINKED_PLATFORMS	+= SUNW,Sun-Fire-V240
56LINKED_PLATFORMS	+= SUNW,Sun-Fire-V250
57LINKED_PLATFORMS	+= SUNW,Sun-Fire-V440
58
59LINKED_DIRS		= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%)
60LINKED_LIB_DIRS		= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib)
61LINKED_PRTDIAG_DIRS	= \
62	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/libprtdiag_psr.so.1)
63
64#
65# Sun-Blade-100 and Sun-Blade-1000 platform library should install into
66# SUNW,Sun-Blade-100. Sun-Blade-100 platforms can
67# link to /usr/platform/SUNW,Sun-Blade-100/lib/libprtdiag_psr.so
68#
69PLATFORM=	SUNW,Sun-Blade-100
70
71$(USR_PLAT_DIR)/$(PLATFORM)/lib/libprtdiag_psr.so.1 := FILEMODE= 0755
72
73.KEEP_STATE:
74
75PLATLIBS=	$(PLATFORM:%=$(USR_PLAT_DIR)/%/lib/)
76
77install:	all $(PLATLIBS) $(USR_PSM_LIBS) \
78		$(LINKED_PRTDIAG_DIRS)
79
80#
81# install rules for SUNW,Sun-Blade-100/lib/libprtdiag_psr.so.1
82#
83$(PLATLIBS):
84	$(INS.dir)
85
86$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
87	$(INS.file)
88
89$(USR_PSM_LIB_DIR):
90	$(INS.dir)
91
92$(LINKED_DIRS):	$(USR_PLAT_DIR)
93	-$(INS.dir)
94
95$(LINKED_LIB_DIRS):	$(LINKED_DIRS)
96	-$(INS.dir)
97
98$(LINKED_PRTDIAG_DIRS):	$(LINKED_LIB_DIRS)
99	-$(INS.slink6)
100
101#
102# Rules for making message files
103#
104POFILE=		libprtdiag_psr_desktop_picl.po
105POFILES=	desktop.po
106
107_msg:	$(MSGDOMAIN) $(POFILE)
108	$(RM) $(MSGDOMAIN)/$(POFILE)
109	$(CP) $(POFILE) $(MSGDOMAIN)
110
111$(POFILE):	$(POFILES)
112	$(RM) $@
113	$(CAT) $(POFILES) > $@
114
115$(POFILES):
116	$(RM) messages.po
117	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../common/picldiag.c`
118	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
119	$(RM) messages.po
120
121