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, Version 1.0 only
   6 # (the "License").  You may not use this file except in compliance
   7 # with the License.
   8 #
   9 # You can obtain a copy of the license at src/sun_nws/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at src/sun_nws/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 #
  23 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 # ident "@(#)Makefile   1.10    08/03/23 SMI"
  27 #
  28 # src/sun_nws/comstar/port_providers/fct/Makefile
  29 #
  30 
  31 include ../../../Makefile.config
  32 include ../../../Makefile.drvrs
  33 
  34 # The following two lines make sure that on sparc the 64 bit version is the
  35 # only one built (sparcv9) and or x86 the 32 bit and 64 bit versions are both
  36 # built.
  37 BUILD32 = $(MACH32:sparc=$(POUND_SIGN))
  38 BUILD32 = $(MACH32:i386=)
  39 
  40 # Staging Areas
  41 # -------------
  42 sparc_STAGING32  = $(PROTO_ROOT)/kernel/drv
  43 sparc_STAGING64  = $(STAGING32)/sparcv9
  44 
  45 i386_STAGING32   = $(PROTO_ROOT)/kernel/drv
  46 i386_STAGING64   = $(STAGING32)/amd64
  47 
  48 STAGING32        = $($(MACH)_STAGING32)
  49 STAGING64        = $($(MACH)_STAGING64)
  50 
  51 # Module Macros
  52 # -------------
  53 MODULE           = iscsit
  54 CONFFILE         = iscsit.conf
  55 MODULE_PKGS      = SUNWiscsitr
  56 
  57 MODULE_SRC       = iscsit.c iscsit_util.c iscsit_login.c
  58 MODULE_SRC      += iscsit_tgt.c iscsit_sess.c
  59 MODULE_SRC      += iscsit_auth.c iscsit_authclient.c iscsit_authglue.c
  60 MODULE_SRC      += radius_auth.c radius_packet.c
  61 
  62 # Kernel Module Dependencies
  63 # --------------------------
  64 LDFLAGS += -dy -Ndrv/stmf -Nmisc/idm -Nmisc/md5
  65 
  66 # Module Object Files
  67 # -------------------
  68 $(BUILD32)MODULE_OBJ_32 = $(MODULE_SRC:%.c=$(OBJ32)/%.o)
  69 $(BUILD64)MODULE_OBJ_64 = $(MODULE_SRC:%.c=$(OBJ64)/%.o)
  70 
  71 # Module Binary Files
  72 # -------------------
  73 $(BUILD32)BINARY32      = $(OBJ32)/$(MODULE)
  74 $(BUILD64)BINARY64      = $(OBJ64)/$(MODULE)
  75 BINARIES                = $(BINARY32) $(BINARY64)
  76 
  77 $(BUILD32)LINT_TARGETS  = lint32
  78 $(BUILD64)LINT_TARGETS += lint64
  79 
  80 COMMON_INCLUDES += -I$(COM_INC_STMF)
  81 COMMON_INCLUDES += -I$(MOD_INC_IDM)
  82 COMMON_INCLUDES += -I$(COM_INC_ISCSI)
  83 COMMON_INCLUDES += -I$(MOD_INC_ISCSIT)
  84 COMMON_INCLUDES += -I$(COMMON_ISCSI_IMPL_HDRS_DIR)
  85 
  86 $(BUILD32)ALLPREQ       += $(OBJ32)
  87 $(BUILD64)ALLPREQ       += $(OBJ64)
  88 ALLPREQ                 += .WAIT
  89 ALLPREQ                 += $(BINARIES)
  90 
  91 INSTALLPREQ              = all
  92 INSTALLPREQ             += .WAIT
  93 $(BUILD32)INSTALLPREQ   += $(STAGING32)
  94 $(BUILD64)INSTALLPREQ   += $(STAGING64)
  95 INSTALLPREQ             += .WAIT
  96 INSTALLPREQ             += $(STAGING32)/$(CONFFILE)
  97 $(BUILD32)INSTALLPREQ   += $(STAGING32)/$(MODULE)
  98 $(BUILD64)INSTALLPREQ   += $(STAGING64)/$(MODULE)
  99 
 100 PKGPREQ                  = install 
 101 PKGPREQ                 += $(PKGAREA) 
 102 PKGPREQ                 += .WAIT
 103 PKGPREQ                 += $(MODULE_PKGS:%=$(PKGAREA)/%)
 104 
 105 CLEANFILES  = $(MODULE_OBJ_32) $(MODULE_OBJ_64)
 106 
 107 CLEANWARFILES    = iscsit.ll
 108 CLEANWARFILES   += iscsit.ok
 109 
 110 CLOBBERFILES  = $(CLEANFILES)
 111 CLOBBERFILES += $(CLEANWARFILES)
 112 CLOBBERFILES += $(MOD_LINT_LIB)
 113 
 114 NUKEFILES  = $(CLOBBERFILES)
 115 NUKEFILES += $(STAGING32)/$(CONFFILE)
 116 NUKEFILES += $(STAGING32)/$(MODULE)
 117 NUKEFILES += $(STAGING64)/$(MODULE)
 118 NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%)
 119 
 120 include ../../../Makefile.common
 121 
 122 #
 123 #       Builddate
 124 #
 125 BUILD_DATE:sh=  date +%\Y%m%d
 126 CPPFLAGS32     += -DBUILD_DATE=\"$(BUILD_DATE)\"
 127 CPPFLAGS64     += -DBUILD_DATE=\"$(BUILD_DATE)\"
 128