xref: /titanic_52/usr/src/cmd/fwflash/Makefile.targ (revision 9241eba2ee6b19f556bc3779eef7f62da5efffe5)
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
31*9241eba2SRobert 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 huangLINTFILE=	$(SRCS:%.c=%.ln)
39a799b1e7Speihong huangPOFILES=	$(SRCS:%.c=%.po)
40a799b1e7Speihong huang
41a799b1e7Speihong huangPOFILE= 	fwflash_msg.po
42a799b1e7Speihong huang
43a799b1e7Speihong huangHDRDIR=../common
44a799b1e7Speihong huangSRCDIR=../common
45a799b1e7Speihong huang
46a799b1e7Speihong huanginclude ../Makefile.com
47a799b1e7Speihong huang
48a799b1e7Speihong huangROOTHDRS= $(HDRS:%=$(ROOTUSRINCLDFWFLASH)/%)
49a799b1e7Speihong huangHDRSRCS= $(HDRS:%=$(HDRDIR)/%)
50a799b1e7Speihong huangCHECKHDRS= $(HDRSRCS:%.h=%.check)
51a799b1e7Speihong huang
52a799b1e7Speihong huang$(ROOTUSRSBIN)/$(PROG) :=	FILEMODE = 0555
53a799b1e7Speihong huang$(ROOTUSRINCLDFWFLASH)/%.h :=       FILEMODE = 0644
54a799b1e7Speihong huang
55a799b1e7Speihong huang
56a799b1e7Speihong huangCFLAGS += -D_POSIX_PTHREAD_SEMANTICS
57a799b1e7Speihong huangLDLIBS += -ldevinfo -lumem -lscf
58a799b1e7Speihong huang
59a799b1e7Speihong huang
60a799b1e7Speihong huang$(ROOTUSRINCLDFWFLASH)/%:  $(HDRDIR)/%
61a799b1e7Speihong huang	$(INS.file)
62a799b1e7Speihong huang
63a799b1e7Speihong huang
64a799b1e7Speihong huang$(PROG): install_h $(OBJS)
65a799b1e7Speihong huang	$(LINK.c) -o $(PROG) $(OBJS) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
66a799b1e7Speihong huang	$(POST_PROCESS)
67a799b1e7Speihong huang
68a799b1e7Speihong huang%.o: $(SRCDIR)/%.c
69a799b1e7Speihong huang	$(COMPILE.c) $(CFLAGS) -o $@ $<
70*9241eba2SRobert Mustacchi	$(CTFCONVERT_O)
71a799b1e7Speihong huang
72a799b1e7Speihong huang
73a799b1e7Speihong huangall:	$(PROG)
74a799b1e7Speihong huang
75a799b1e7Speihong huangclean:
76a799b1e7Speihong huang	$(RM) $(POFILE) $(POFILES) $(LINTFILE) $(PROG)
77a799b1e7Speihong huang
78a799b1e7Speihong huangclobber: clean
79a799b1e7Speihong huang	$(RM) $(OBJS)
80a799b1e7Speihong huang
81a799b1e7Speihong huangcheck: $(CHECKHDRS)
82a799b1e7Speihong huang
83a799b1e7Speihong huanginstall: all $(ROOTUSRSBIN) $(ROOTUSRSBIN)/$(PROG)
84a799b1e7Speihong huang
85a799b1e7Speihong huanginstall_h:$(ROOTUSRINCLDFWFLASH) $(ROOTHDRS)
86a799b1e7Speihong huang
87a799b1e7Speihong huanglint: $(LINTFILE)
88a799b1e7Speihong huang
89a799b1e7Speihong huang_msg msg:	$(POFILE)
90