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