1fcf3ce44SJohn Forte# 2fcf3ce44SJohn Forte# CDDL HEADER START 3fcf3ce44SJohn Forte# 4fcf3ce44SJohn Forte# The contents of this file are subject to the terms of the 5fcf3ce44SJohn Forte# Common Development and Distribution License (the "License"). 6fcf3ce44SJohn Forte# You may not use this file except in compliance with the License. 7fcf3ce44SJohn Forte# 8fcf3ce44SJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9fcf3ce44SJohn Forte# or http://www.opensolaris.org/os/licensing. 10fcf3ce44SJohn Forte# See the License for the specific language governing permissions 11fcf3ce44SJohn Forte# and limitations under the License. 12fcf3ce44SJohn Forte# 13fcf3ce44SJohn Forte# When distributing Covered Code, include this CDDL HEADER in each 14fcf3ce44SJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15fcf3ce44SJohn Forte# If applicable, add the following below this CDDL HEADER, with the 16fcf3ce44SJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying 17fcf3ce44SJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner] 18fcf3ce44SJohn Forte# 19fcf3ce44SJohn Forte# CDDL HEADER END 20fcf3ce44SJohn Forte# 21fcf3ce44SJohn Forte# 222a8164dfSZhong Wang# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23fcf3ce44SJohn Forte# Use is subject to license terms. 24fcf3ce44SJohn Forte# 25fcf3ce44SJohn Forte# 26fcf3ce44SJohn Forte 27fcf3ce44SJohn ForteCOMMONBASE = ../../common 28fcf3ce44SJohn Forte 29fcf3ce44SJohn Forte 30fcf3ce44SJohn FortePROG = fcinfo 31fcf3ce44SJohn ForteROOT_PROG_LINK = $(ROOTUSRSBIN)/fcadm 32fcf3ce44SJohn ForteMANIFEST = npiv_config.xml 33fcf3ce44SJohn ForteSVCMETHOD = npivconfig 34fcf3ce44SJohn FortePRODUCT = $(PROG) 35fcf3ce44SJohn Forte 36fcf3ce44SJohn Forte$(ROOT_PROG_LINK) := FILEMODE = 0555 37fcf3ce44SJohn Forte 382a8164dfSZhong WangLOCAL_OBJS = fcinfo.o fcinfo-list.o fcadm-list.o printAttrs.o fcoeadm.o 39fcf3ce44SJohn ForteCOMMON_OBJS = cmdparse.o 40fcf3ce44SJohn ForteLOCAL_SRCS = $(LOCAL_OBJS:%.o=%.c) 41fcf3ce44SJohn ForteCOMMON_SRCS = $(COMMON_OBJS:%.o=$(COMMONBASE)/cmdparse/%.c) 42fcf3ce44SJohn ForteOBJS = $(LOCAL_OBJS) $(COMMON_OBJS) 43fcf3ce44SJohn ForteSRCS = $(LOCAL_SRCS) $(COMMON_SRCS) 44fcf3ce44SJohn Forte 45fcf3ce44SJohn Forteinclude ../Makefile.cmd 46fcf3ce44SJohn Forte 472a8164dfSZhong WangPOFILE = fcinfo_cmd.po 482a8164dfSZhong WangPOFILES = fcinfo.po fcinfo-list.po fcadm-list.po printAttrs.po fcoeadm.po 492a8164dfSZhong Wang 50*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 51*7014882cSRichard Lowe 52fcf3ce44SJohn ForteROOTMANIFESTDIR= $(ROOTSVCNETWORK) 53fcf3ce44SJohn Forte 54fcf3ce44SJohn ForteLDLIBS += -lHBAAPI 552a8164dfSZhong WangLDLIBS += -lfcoe 56fcf3ce44SJohn ForteLDLIBS += -lscf 57fcf3ce44SJohn Forte 58fcf3ce44SJohn ForteINCS += -I. 59fcf3ce44SJohn ForteINCS += -I$(SRC)/lib/hbaapi/common 60fcf3ce44SJohn ForteINCS += -I$(COMMONBASE)/cmdparse 612a8164dfSZhong WangINCS += -I$(SRC)/lib/libfcoe/common 62fcf3ce44SJohn Forte 63fcf3ce44SJohn ForteCPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) 64fcf3ce44SJohn Forte$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 65fcf3ce44SJohn Forte 66fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_SUSPICIOUS_COMPARISON 67fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_SEC_SPRINTF_UNBOUNDED_COPY 68fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 69fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN 70fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 71fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2 72fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_STATIC_UNUSED 73fcf3ce44SJohn Forte 74fcf3ce44SJohn Forte.KEEP_STATE: 75fcf3ce44SJohn Forte 76fcf3ce44SJohn Forteall: $(PROG) 77fcf3ce44SJohn Forte 78fcf3ce44SJohn Forte$(PROG): $(OBJS) 79fcf3ce44SJohn Forte $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 80fcf3ce44SJohn Forte $(POST_PROCESS) 81fcf3ce44SJohn Forte 82fcf3ce44SJohn Forte$(ROOT_PROG_LINK): $(ROOTUSRSBIN)/$(PROG) 83fcf3ce44SJohn Forte -$(RM) $@ 84fcf3ce44SJohn Forte $(LN) $(ROOTUSRSBIN)/$(PROG) $@ 85fcf3ce44SJohn Forte 86fcf3ce44SJohn Forteinstall: all $(ROOTMANIFEST) $(ROOTSVCMETHOD) $(ROOTUSRSBINPROG) $(ROOT_PROG_LINK) 87fcf3ce44SJohn Forte 88fcf3ce44SJohn Fortecmdparse.o: $(COMMONBASE)/cmdparse/cmdparse.c 89fcf3ce44SJohn Forte $(COMPILE.c) -o $@ $(COMMONBASE)/cmdparse/cmdparse.c 90fcf3ce44SJohn Forte $(POST_PROCESS_O) 912a8164dfSZhong Wang$(POFILE): $(POFILES) 922a8164dfSZhong Wang $(RM) $@ 932a8164dfSZhong Wang $(CAT) $(POFILES) > $@ 94fcf3ce44SJohn Forteclean: 95fcf3ce44SJohn Forte $(RM) $(OBJS) 96fcf3ce44SJohn Forte 97fcf3ce44SJohn Fortelint: lint_SRCS 98fcf3ce44SJohn Forte 99fcf3ce44SJohn Fortecheck: $(CHKMANIFEST) 100fcf3ce44SJohn Forte 101fcf3ce44SJohn Forte# Links from /usr/sbin to /sbin 102fcf3ce44SJohn Forte$(ROOTUSRSBINLINKS): 103fcf3ce44SJohn Forte -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@ 104fcf3ce44SJohn Forte 105fcf3ce44SJohn Forteinclude ../Makefile.targ 106