xref: /illumos-gate/usr/src/cmd/fwflash/Makefile.targ (revision 3aa6c13072f3d4792a18693e916aed260a496c1f)
1a799b1e7Speihong huang#
2a799b1e7Speihong huang# CDDL HEADER START
3a799b1e7Speihong huang#
4a799b1e7Speihong huang# The contents of this file are subject to the terms of the
5a799b1e7Speihong huang# Common Development and Distribution License (the "License").
6a799b1e7Speihong huang# You may not use this file except in compliance with the License.
7a799b1e7Speihong huang#
8a799b1e7Speihong huang# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a799b1e7Speihong huang# or http://www.opensolaris.org/os/licensing.
10a799b1e7Speihong huang# See the License for the specific language governing permissions
11a799b1e7Speihong huang# and limitations under the License.
12a799b1e7Speihong huang#
13a799b1e7Speihong huang# When distributing Covered Code, include this CDDL HEADER in each
14a799b1e7Speihong huang# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a799b1e7Speihong huang# If applicable, add the following below this CDDL HEADER, with the
16a799b1e7Speihong huang# fields enclosed by brackets "[]" replaced with your own identifying
17a799b1e7Speihong huang# information: Portions Copyright [yyyy] [name of copyright owner]
18a799b1e7Speihong huang#
19a799b1e7Speihong huang# CDDL HEADER END
20a799b1e7Speihong huang#
21a799b1e7Speihong huang# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22a799b1e7Speihong huang# Use is subject to license terms.
23a799b1e7Speihong huang#
24a799b1e7Speihong huang#
25a799b1e7Speihong huang# cmd/fwflash
26a799b1e7Speihong huang#
27a799b1e7Speihong huang#
28a799b1e7Speihong huang
29a799b1e7Speihong huanginclude $(SRC)/Makefile.master
30a799b1e7Speihong huanginclude $(SRC)/cmd/Makefile.cmd
310b4d6575SRobert Mustacchiinclude $(SRC)/cmd/Makefile.ctf
32a799b1e7Speihong huang
33a799b1e7Speihong huangSRCS=		fwflash.c
34a799b1e7Speihong huangHDRS=		fwflash.h
35a799b1e7Speihong huang
36a799b1e7Speihong huangPROG=		$(SRCS:%.c=%)
37a799b1e7Speihong huangOBJS=		$(SRCS:%.c=%.o)
38a799b1e7Speihong huangPOFILES=	$(SRCS:%.c=%.po)
39a799b1e7Speihong huang
40a799b1e7Speihong huangPOFILE=		fwflash_msg.po
41a799b1e7Speihong huang
42a799b1e7Speihong huangHDRDIR=../common
43a799b1e7Speihong huangSRCDIR=../common
44a799b1e7Speihong huang
45a799b1e7Speihong huanginclude ../Makefile.com
46a799b1e7Speihong huang
47a799b1e7Speihong huangROOTHDRS= $(HDRS:%=$(ROOTUSRINCLDFWFLASH)/%)
48a799b1e7Speihong huangHDRSRCS= $(HDRS:%=$(HDRDIR)/%)
49a799b1e7Speihong huangCHECKHDRS= $(HDRSRCS:%.h=%.check)
50a799b1e7Speihong huang
51a799b1e7Speihong huang$(ROOTUSRSBIN)/$(PROG) :=	FILEMODE = 0555
52a799b1e7Speihong huang$(ROOTUSRINCLDFWFLASH)/%.h :=       FILEMODE = 0644
53a799b1e7Speihong huang
54a799b1e7Speihong huang
55a799b1e7Speihong huangCFLAGS += -D_POSIX_PTHREAD_SEMANTICS
56a799b1e7Speihong huangLDLIBS += -ldevinfo -lumem -lscf
57a799b1e7Speihong huang
58a799b1e7Speihong huang
59a799b1e7Speihong huang$(ROOTUSRINCLDFWFLASH)/%:  $(HDRDIR)/%
60a799b1e7Speihong huang	$(INS.file)
61a799b1e7Speihong huang
62a799b1e7Speihong huang
63a799b1e7Speihong huang$(PROG): install_h $(OBJS)
64a799b1e7Speihong huang	$(LINK.c) -o $(PROG) $(OBJS) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
65a799b1e7Speihong huang	$(POST_PROCESS)
66a799b1e7Speihong huang
67a799b1e7Speihong huang%.o: $(SRCDIR)/%.c
68a799b1e7Speihong huang	$(COMPILE.c) $(CFLAGS) -o $@ $<
690b4d6575SRobert Mustacchi	$(CTFCONVERT_O)
70a799b1e7Speihong huang
71a799b1e7Speihong huang
72a799b1e7Speihong huangall:	$(PROG)
73a799b1e7Speihong huang
74a799b1e7Speihong huangclean:
75*3aa6c130SRichard Lowe	$(RM) $(POFILE) $(POFILES) $(PROG)
76a799b1e7Speihong huang
77a799b1e7Speihong huangclobber: clean
78a799b1e7Speihong huang	$(RM) $(OBJS)
79a799b1e7Speihong huang
80a799b1e7Speihong huangcheck: $(CHECKHDRS)
81a799b1e7Speihong huang
82a799b1e7Speihong huanginstall: all $(ROOTUSRSBIN) $(ROOTUSRSBIN)/$(PROG)
83a799b1e7Speihong huang
84a799b1e7Speihong huanginstall_h:$(ROOTUSRINCLDFWFLASH) $(ROOTHDRS)
85a799b1e7Speihong huang
86*3aa6c130SRichard Lowe_msg:	$(POFILE)
87