xref: /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/desktop/picl/Makefile (revision 43449cdcd0600512dd862537f2cf014140dd0844)
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# Copyright 2019 Peter Tribble.
25#
26# lib/libprtdiag_psr/sparc/desktop/picl/Makefile
27
28UTSBASE = $(SRC)/uts
29
30PLATFORM_OBJECTS= picldiag.o
31
32objs/%.o pics/%.o: ../common/%.c
33	$(COMPILE.c) $(IFLAGS) -o $@ $<
34	$(POST_PROCESS_O)
35
36include $(SRC)/lib/libprtdiag_psr/sparc/Makefile.com
37
38SRCS=	$(OBJECTS:%.o=../common/%.c)
39
40LDLIBS += -lpicl
41
42IFLAGS += -I$(USR_PLAT_DIR)/sun4u/include -I ../../../../libprtdiag/inc
43IFLAGS += -I$(SRC)/cmd/picl/plugins/inc
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,Sun-Fire-V240
55LINKED_PLATFORMS	+= SUNW,Sun-Fire-V250
56LINKED_PLATFORMS	+= SUNW,Sun-Fire-V440
57
58LINKED_DIRS		= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%)
59LINKED_LIB_DIRS		= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib)
60LINKED_PRTDIAG_DIRS	= \
61	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/libprtdiag_psr.so.1)
62
63#
64# Sun-Blade-100 and Sun-Blade-1000 platform library should install into
65# SUNW,Sun-Blade-100. Sun-Blade-100 platforms can
66# link to /usr/platform/SUNW,Sun-Blade-100/lib/libprtdiag_psr.so
67#
68PLATFORM=	SUNW,Sun-Blade-100
69
70$(USR_PLAT_DIR)/$(PLATFORM)/lib/libprtdiag_psr.so.1 := FILEMODE= 0755
71
72.KEEP_STATE:
73
74PLATLIBS=	$(PLATFORM:%=$(USR_PLAT_DIR)/%/lib/)
75
76install:	all $(PLATLIBS) $(USR_PSM_LIBS) \
77		$(LINKED_PRTDIAG_DIRS)
78
79#
80# install rules for SUNW,Sun-Blade-100/lib/libprtdiag_psr.so.1
81#
82$(PLATLIBS):
83	$(INS.dir)
84
85$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
86	$(INS.file)
87
88$(USR_PSM_LIB_DIR):
89	$(INS.dir)
90
91$(LINKED_DIRS):	$(USR_PLAT_DIR)
92	-$(INS.dir)
93
94$(LINKED_LIB_DIRS):	$(LINKED_DIRS)
95	-$(INS.dir)
96
97$(LINKED_PRTDIAG_DIRS):	$(LINKED_LIB_DIRS)
98	-$(INS.slink6)
99
100#
101# Rules for making message files
102#
103POFILE=		libprtdiag_psr_desktop_picl.po
104POFILES=	desktop.po
105
106_msg:	$(MSGDOMAIN) $(POFILE)
107	$(RM) $(MSGDOMAIN)/$(POFILE)
108	$(CP) $(POFILE) $(MSGDOMAIN)
109
110$(POFILE):	$(POFILES)
111	$(RM) $@
112	$(CAT) $(POFILES) > $@
113
114$(POFILES):
115	$(RM) messages.po
116	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../common/picldiag.c`
117	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
118	$(RM) messages.po
119
120