xref: /titanic_51/usr/src/cmd/fwflash/sparc/Makefile (revision dc5415b5ee3585f3fb9e8f0a33ea3f5926e13999)
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 2008 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24#ident	"%Z%%M%	%I%	%E% SMI"
25#
26# cmd/fwflash/sparc/Makefile
27#
28#
29
30
31PROG=		fwflash
32OBJS=		fwflash.o
33SRCS=		fwflash.c
34LINTFILE=	fwflash.ln
35
36
37all:	$(PROG)
38lint:	lint_SRCS
39
40include $(SRC)/Makefile.master
41include $(SRC)/cmd/Makefile.cmd
42include ../Makefile.com
43
44$(ROOTUSRSBIN)/$(PROG) :=	FILEMODE = 0555
45
46#
47# Message catalog
48#
49POFILES= $(SRCS:%.c=%.po)
50POFILE= fwflash_msg.po
51
52CFLAGS	+= -g -D_POSIX_PTHREAD_SEMANTICS
53LDLIBS += -ldevinfo -lumem
54
55#
56# Message catalog
57#
58
59$(POFILES): ../common/$(SRCS)
60	$(RM) messages.po
61	$(XGETTEXT) $(XGETFLAGS) \
62	    `($(GREP) -l gettext ../common/fwflash.c || echo /dev/null)`
63	$(SED) "/^domain/d" messages.po > $@
64	$(RM) messages.po
65
66$(POFILE): $(POFILES)
67	$(RM) $@
68	cat $(POFILES) > $@
69
70
71clean:
72	$(RM) $(PROG) $(OBJS)
73
74clobber: clean
75	$(RM) $(POFILE) $(POFILES) $(LINTFILE)
76
77install_h:
78	@cd ../common ; $(MAKE) install_h
79
80$(PROG): install_h $(OBJS)
81	$(LINK.c) -o $(PROG) $(OBJS) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
82	$(POST_PROCESS)
83
84%.o: ../common/%.c
85	$(COMPILE.c) $(CFLAGS) -o $@ $<
86
87install: all $(ROOTUSRSBIN) $(ROOTUSRSBIN)/$(PROG)
88
89lint_SRCS: ../common/$(SRCS:%.c=%.ln)
90
91_msg msg:	$(POFILE)
92