xref: /titanic_41/usr/src/cmd/fwflash/i386/Makefile (revision fbdfbdd80db964f47d48b36c08c747e636fe7b42)
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/i386/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
52
53CFLAGS	+= -g -D_POSIX_PTHREAD_SEMANTICS -D MANUFACTURING_MODE=0
54LDLIBS += -ldevinfo -lumem
55
56#
57# Message catalog
58#
59
60$(POFILES): ../common/$(SRCS)
61	$(RM) messages.po
62	$(XGETTEXT) $(XGETFLAGS) \
63	    `($(GREP) -l gettext ../common/fwflash.c || echo /dev/null)`
64	$(SED) "/^domain/d" messages.po > $@
65	$(RM) messages.po
66
67$(POFILE): $(POFILES)
68	$(RM) $@
69	cat $(POFILES) > $@
70
71
72clean:
73	$(RM) $(PROG) $(OBJS)
74
75clobber: clean
76	$(RM) $(POFILE) $(POFILES) $(LINTFILE)
77
78install_h:
79	@cd ../common ; $(MAKE) install_h
80
81$(PROG): install_h $(OBJS)
82	$(LINK.c) -o $(PROG) $(OBJS) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
83	$(POST_PROCESS)
84
85%.o: ../common/%.c
86	$(COMPILE.c) $(CFLAGS) -o $@ $<
87
88install: all $(ROOTUSRSBIN) $(ROOTUSRSBIN)/$(PROG)
89
90lint_SRCS: ../common/$(SRCS:%.c=%.ln)
91
92_msg msg:	$(POFILE)
93