--- /dev/null Fri Apr 4 13:31:04 2008 +++ new/src/sun_nws/comstar/port_providers/iscsit/Makefile Fri Apr 4 13:31:04 2008 @@ -0,0 +1,128 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at src/sun_nws/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at src/sun_nws/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "@(#)Makefile 1.10 08/03/23 SMI" +# +# src/sun_nws/comstar/port_providers/fct/Makefile +# + +include ../../../Makefile.config +include ../../../Makefile.drvrs + +# The following two lines make sure that on sparc the 64 bit version is the +# only one built (sparcv9) and or x86 the 32 bit and 64 bit versions are both +# built. +BUILD32 = $(MACH32:sparc=$(POUND_SIGN)) +BUILD32 = $(MACH32:i386=) + +# Staging Areas +# ------------- +sparc_STAGING32 = $(PROTO_ROOT)/kernel/drv +sparc_STAGING64 = $(STAGING32)/sparcv9 + +i386_STAGING32 = $(PROTO_ROOT)/kernel/drv +i386_STAGING64 = $(STAGING32)/amd64 + +STAGING32 = $($(MACH)_STAGING32) +STAGING64 = $($(MACH)_STAGING64) + +# Module Macros +# ------------- +MODULE = iscsit +CONFFILE = iscsit.conf +MODULE_PKGS = SUNWiscsitr + +MODULE_SRC = iscsit.c iscsit_util.c iscsit_login.c +MODULE_SRC += iscsit_tgt.c iscsit_sess.c +MODULE_SRC += iscsit_auth.c iscsit_authclient.c iscsit_authglue.c +MODULE_SRC += radius_auth.c radius_packet.c + +# Kernel Module Dependencies +# -------------------------- +LDFLAGS += -dy -Ndrv/stmf -Nmisc/idm -Nmisc/md5 + +# Module Object Files +# ------------------- +$(BUILD32)MODULE_OBJ_32 = $(MODULE_SRC:%.c=$(OBJ32)/%.o) +$(BUILD64)MODULE_OBJ_64 = $(MODULE_SRC:%.c=$(OBJ64)/%.o) + +# Module Binary Files +# ------------------- +$(BUILD32)BINARY32 = $(OBJ32)/$(MODULE) +$(BUILD64)BINARY64 = $(OBJ64)/$(MODULE) +BINARIES = $(BINARY32) $(BINARY64) + +$(BUILD32)LINT_TARGETS = lint32 +$(BUILD64)LINT_TARGETS += lint64 + +COMMON_INCLUDES += -I$(COM_INC_STMF) +COMMON_INCLUDES += -I$(MOD_INC_IDM) +COMMON_INCLUDES += -I$(COM_INC_ISCSI) +COMMON_INCLUDES += -I$(MOD_INC_ISCSIT) +COMMON_INCLUDES += -I$(COMMON_ISCSI_IMPL_HDRS_DIR) + +$(BUILD32)ALLPREQ += $(OBJ32) +$(BUILD64)ALLPREQ += $(OBJ64) +ALLPREQ += .WAIT +ALLPREQ += $(BINARIES) + +INSTALLPREQ = all +INSTALLPREQ += .WAIT +$(BUILD32)INSTALLPREQ += $(STAGING32) +$(BUILD64)INSTALLPREQ += $(STAGING64) +INSTALLPREQ += .WAIT +INSTALLPREQ += $(STAGING32)/$(CONFFILE) +$(BUILD32)INSTALLPREQ += $(STAGING32)/$(MODULE) +$(BUILD64)INSTALLPREQ += $(STAGING64)/$(MODULE) + +PKGPREQ = install +PKGPREQ += $(PKGAREA) +PKGPREQ += .WAIT +PKGPREQ += $(MODULE_PKGS:%=$(PKGAREA)/%) + +CLEANFILES = $(MODULE_OBJ_32) $(MODULE_OBJ_64) + +CLEANWARFILES = iscsit.ll +CLEANWARFILES += iscsit.ok + +CLOBBERFILES = $(CLEANFILES) +CLOBBERFILES += $(CLEANWARFILES) +CLOBBERFILES += $(MOD_LINT_LIB) + +NUKEFILES = $(CLOBBERFILES) +NUKEFILES += $(STAGING32)/$(CONFFILE) +NUKEFILES += $(STAGING32)/$(MODULE) +NUKEFILES += $(STAGING64)/$(MODULE) +NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%) + +include ../../../Makefile.common + +# +# Builddate +# +BUILD_DATE:sh= date +%\Y%m%d +CPPFLAGS32 += -DBUILD_DATE=\"$(BUILD_DATE)\" +CPPFLAGS64 += -DBUILD_DATE=\"$(BUILD_DATE)\" +