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 22 # 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 27 PROG= iscsitgtd 28 OBJS = main.o mgmt.o mgmt_create.o mgmt_list.o mgmt_modify.o mgmt_remove.o 29 OBJS += iscsi_authclient.o iscsi_authglue.o iscsi_cmd.o iscsi_conn.o 30 OBJS += iscsi_crc.o iscsi_ffp.o iscsi_login.o iscsi_sess.o radius.o 31 OBJS += t10_sam.o t10_spc.o t10_sbc.o t10_raw_if.o t10_ssc.o t10_osd.o 32 OBJS += t10_spc_pr.o util.o util_err.o util_ifname.o util_port.o util_queue.o 33 OBJS += isns_client.o isns.o mgmt_scf.o 34 POFILE= iscsitgtd.po 35 POFILES = $(OBJS:%.o=%.po) 36 37 include ../../Makefile.cmd 38 include $(SRC)/cmd/iscsi/Makefile.iscsi 39 40 $(64ONLY)SUBDIRS= $(MACH) 41 $(BUILD64)SUBDIRS += $(MACH64) 42 43 MANIFEST = iscsi_target.xml 44 SVCMETHOD = svc-iscsitgt 45 46 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) 47 $(ROOTSVCSYSTEM)/iscsi_target.xml := FILEMODE = 0444 48 49 DLIBSRCS = iscsi.d 50 51 ROOTDLIBDIR = $(ROOT)/usr/lib/dtrace 52 ROOTDLIBS = $(DLIBSRCS:%=$(ROOTDLIBDIR)/%) 53 $(ROOTDLIBS) := FILEMODE = 0644 54 55 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I${ISCSICOMMONDIR} -I${HDCRCCOMMONDIR} 56 57 all := TARGET = all 58 install := TARGET = install 59 clean := TARGET = clean 60 clobber := TARGET = clobber 61 lint := TARGET = lint 62 63 .KEEP_STATE: 64 65 all: $(SUBDIRS) 66 67 clean clobber lint: $(SUBDIRS) 68 69 install: $(SUBDIRS) $(ROOTMANIFEST) $(ROOTDLIBS) $(ROOTSVCMETHOD) 70 -$(RM) $(ROOTUSRSBINPROG) 71 -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG) 72 73 $(SUBDIRS): FRC 74 @cd $@; pwd; $(MAKE) $(TARGET) 75 76 catalog: $(POFILE) 77 78 $(POFILE): $(POFILES) 79 $(RM) $@ 80 cat $(POFILES) > $@ 81 82 check: $(CHKMANIFEST) 83 84 $(ROOTDLIBDIR): 85 $(INS.dir) 86 87 $(ROOTDLIBDIR)/%.d: %.d 88 $(INS.file) 89 90 $(ROOTDLIBS): $(ROOTDLIBDIR) 91 92 FRC: 93 94 include ../../Makefile.targ 95