xref: /illumos-gate/usr/src/cmd/fwflash/Makefile.com (revision 1f606c5b8e527ed924f5cbdbbce612887c7dbe32)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# Copyright (c) 2018, Joyent, Inc.
25#
26# common rules for $SRC/cmd/fwflash
27
28CERRWARN +=		-_gcc=-Wno-parentheses
29CERRWARN +=		-_gcc=-Wno-address
30
31# not linted
32SMATCH=off
33
34ROOTUSR=                $(ROOT)/usr
35ROOTUSRINCLD=		$(ROOTUSR)/include
36ROOTUSRINCLDFWFLASH=	$(ROOTUSRINCLD)/fwflash
37ROOTUSRLIB=             $(ROOTUSR)/lib
38ROOTUSRLIBFWFLASH=	$(ROOTUSRLIB)/fwflash
39ROOTUSRLIBFWFLASHIDF=	$(ROOTUSRLIBFWFLASH)/identify
40ROOTUSRLIBFWFLASHVRF=   $(ROOTUSRLIBFWFLASH)/verify
41ROOTUSRSBIN=		$(ROOTUSR)/sbin
42
43$(ROOTUSR):
44	$(INS.dir)
45
46$(ROOTUSRINCLD):	$(ROOTUSR)
47	$(INS.dir)
48
49$(ROOTUSRINCLDFWFLASH):
50	$(INS.dir)
51
52$(ROOTUSRINCLDFWFLASH)/%: $(ROOTUSRINCLDFWFLASH) %
53	$(INS.file)
54
55$(ROOTUSRLIB):
56	$(INS.dir)
57
58$(ROOTUSRLIBFWFLASH):	$(ROOTUSRLIB)
59	$(INS.dir)
60
61$(ROOTUSRLIBFWFLASH)/%:	$(ROOTUSRLIB) %
62	$(INS.dir)
63
64$(ROOTUSRLIBFWFLASHIDF): $(ROOTUSRLIBFWFLASH)
65	$(INS.dir)
66
67$(ROOTUSRLIBFWFLASHIDF)/%: $(ROOTUSRLIBFWFLASHIDF) %
68	$(INS.file)
69
70$(ROOTUSRLIBFWFLASHVRF): $(ROOTUSRLIBFWFLASH)
71	$(INS.dir)
72
73$(ROOTUSRLIBFWFLASHVRF)/%: $(ROOTUSRLIBFWFLASHVRF) %
74	$(INS.file)
75
76$(ROOTUSRSBIN):		$(ROOTUSR)
77	$(INS.dir)
78
79$(ROOTUSRSBIN)/%:	%
80	$(INS.file)
81
82%.po: $(SRCDIR)/%.c
83	$(RM) messages.po
84	$(XGETTEXT) $(XGETFLAGS) \
85	    `($(GREP) -l gettext $< || echo /dev/null)`
86	$(SED) "/^domain/d" messages.po > $@
87	$(RM) messages.po
88
89$(POFILE): $(POFILES)
90	$(RM) $@
91	cat $(POFILES) >$@
92