xref: /illumos-gate/usr/src/cmd/fcoesvc/Makefile (revision 48bc00d6)
12a8164dfSZhong Wang#
22a8164dfSZhong Wang# CDDL HEADER START
32a8164dfSZhong Wang#
42a8164dfSZhong Wang# The contents of this file are subject to the terms of the
52a8164dfSZhong Wang# Common Development and Distribution License (the "License").
62a8164dfSZhong Wang# You may not use this file except in compliance with the License.
72a8164dfSZhong Wang#
82a8164dfSZhong Wang# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
92a8164dfSZhong Wang# or http://www.opensolaris.org/os/licensing.
102a8164dfSZhong Wang# See the License for the specific language governing permissions
112a8164dfSZhong Wang# and limitations under the License.
122a8164dfSZhong Wang#
132a8164dfSZhong Wang# When distributing Covered Code, include this CDDL HEADER in each
142a8164dfSZhong Wang# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
152a8164dfSZhong Wang# If applicable, add the following below this CDDL HEADER, with the
162a8164dfSZhong Wang# fields enclosed by brackets "[]" replaced with your own identifying
172a8164dfSZhong Wang# information: Portions Copyright [yyyy] [name of copyright owner]
182a8164dfSZhong Wang#
192a8164dfSZhong Wang# CDDL HEADER END
202a8164dfSZhong Wang#
21e6eb57e7SKevin Yu
222a8164dfSZhong Wang#
232a8164dfSZhong Wang# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
242a8164dfSZhong Wang# Use is subject to license terms.
252a8164dfSZhong Wang#
262a8164dfSZhong Wang
27*7ff83669SZhong WangPROGFCOET	= svc-fcoet
28*7ff83669SZhong WangPROGFCOEI	= svc-fcoei
29*7ff83669SZhong WangPROG		= ${PROGFCOET} ${PROGFCOEI}
30e6eb57e7SKevin Yu
31e6eb57e7SKevin Yuinclude ../Makefile.cmd
32e6eb57e7SKevin Yu
33*7ff83669SZhong WangCOMMONBASE	= ../../common
34e6eb57e7SKevin Yu
35*7ff83669SZhong WangOBJSFCOET	= fcoetsvc.o
36*7ff83669SZhong WangOBJSFCOEI	= fcoeisvc.o
37*7ff83669SZhong WangSRCSFCOET	= $(OBJSFCOET:%.o=%.c)
38*7ff83669SZhong WangSRCSFCOEI	= $(OBJSFCOEI:%.o=%.c)
39*7ff83669SZhong WangSRCS		= $(SRCSFCOET) ${SRCSFCOEI}
40e6eb57e7SKevin Yu
41*7ff83669SZhong WangLDLIBS		+= -lfcoe
42e6eb57e7SKevin Yu
43*7ff83669SZhong WangMANIFEST	= fcoe_target.xml
44*7ff83669SZhong WangMANIFEST	+= fcoe_initiator.xml
45*7ff83669SZhong WangSVCMETHOD	= svc-fcoet
46*7ff83669SZhong WangSVCMETHOD	+= svc-fcoei
47e6eb57e7SKevin Yu
48e6eb57e7SKevin YuROOTMANIFESTDIR	= $(ROOTSVCSYSTEM)
49e6eb57e7SKevin Yu$(ROOTSVCSYSTEM)/fcoe_target.xml	:= FILEMODE = 0444
50*7ff83669SZhong Wang$(ROOTSVCSYSTEM)/fcoe_initiator.xml	:= FILEMODE = 0444
51e6eb57e7SKevin Yu
52e6eb57e7SKevin Yu.KEEP_STATE:
53e6eb57e7SKevin Yu
54e6eb57e7SKevin Yuall: $(PROG)
55e6eb57e7SKevin Yu
56*7ff83669SZhong Wang$(PROGFCOET): $(OBJSFCOET)
57*7ff83669SZhong Wang	$(LINK.c) -o $@ $(OBJSFCOET) $(LDLIBS)
58*7ff83669SZhong Wang	$(POST_PROCESS)
59*7ff83669SZhong Wang
60*7ff83669SZhong Wang$(PROGFCOEI): $(OBJSFCOEI)
61*7ff83669SZhong Wang	$(LINK.c) -o $@ $(OBJSFCOEI) $(LDLIBS)
62e6eb57e7SKevin Yu	$(POST_PROCESS)
63e6eb57e7SKevin Yu
64e6eb57e7SKevin Yuinstall: all $(ROOTMANIFEST) $(ROOTSVCMETHOD)
65e6eb57e7SKevin Yu
66e6eb57e7SKevin Yucheck:	$(CHKMANIFEST)
67e6eb57e7SKevin Yu	$(CSTYLE) -pPc $(SRCS:%=%)
68e6eb57e7SKevin Yu
69e6eb57e7SKevin Yuclean:
70*7ff83669SZhong Wang	$(RM) $(OBJSFCOET) ${OBJSFCOEI}
71e6eb57e7SKevin Yu
72*7ff83669SZhong Wanglint:
73*7ff83669SZhong Wang	$(LINT.c) $(SRCSFCOET) $(LDLIBS)
74*7ff83669SZhong Wang	$(LINT.c) $(SRCSFCOEI) ${LDLIBS}
75e6eb57e7SKevin Yu
76e6eb57e7SKevin Yuinclude ../Makefile.targ
77