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 src/sun_nws/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 src/sun_nws/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 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 # ident "@(#)Makefile 1.3 08/03/23 SMI" 26 # 27 # src/sun_nws/idm/Makefile 28 # 29 30 include ../Makefile.config 31 include ../Makefile.drvrs 32 33 # The following two lines make sure that on sparc the 64 bit version is the 34 # only one built (sparcv9) and or x86 the 32 bit and 64 bit versions are both 35 # built. 36 BUILD32 = $(MACH32:sparc=$(POUND_SIGN)) 37 BUILD32 = $(MACH32:i386=) 38 39 sparc_STAGING32 = $(PROTO_ROOT)/kernel/misc 40 sparc_STAGING64 = $(STAGING32)/sparcv9 41 42 i386_STAGING32 = $(PROTO_ROOT)/kernel/misc 43 i386_STAGING64 = $(STAGING32)/amd64 44 45 STAGING32 = $($(MACH)_STAGING32) 46 STAGING64 = $($(MACH)_STAGING64) 47 48 # Kernel Module Dependencies 49 LDFLAGS += -dy -N"fs/sockfs" 50 51 MODULE = idm 52 53 MODULE_PKGS = SUNWiscsitr 54 55 #CLASS_ACTIONS = $(ON_REF_GATE)/usr/src/pkgdefs/common_files/i.manifest 56 #CLASS_ACTIONS += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/r.manifest 57 #CLASS_ACTIONS += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/i.rbac 58 #CLASS_ACTIONS += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/r.rbac 59 #CLASS_ACTIONS += $(CLASS_ACTIONS_DIR)/i.idmconf 60 61 MODULE_SRC = idm.c 62 MODULE_SRC += idm_impl.c 63 MODULE_SRC += idm_so.c 64 MODULE_SRC += idm_conn_sm.c 65 66 MODULE_OBJ_32 = $(MODULE_SRC:%.c=$(OBJ32)/%.o) 67 MODULE_OBJ_32 += $(COMMON_SRC:$(COM_SRC_ISCSI)/%.c=$(OBJ32)/%.o) 68 MODULE_OBJ_64 = $(MODULE_SRC:%.c=$(OBJ64)/%.o) 69 MODULE_OBJ_64 += $(COMMON_SRC:$(COM_SRC_ISCSI)/%.c=$(OBJ64)/%.o) 70 71 72 $(BUILD32)BINARY32 = $(OBJ32)/$(MODULE) 73 $(BUILD64)BINARY64 = $(OBJ64)/$(MODULE) 74 BINARIES = $(BINARY32) $(BINARY64) 75 76 $(BUILD32)LINT_TARGETS = lint32 77 $(BUILD64)LINT_TARGETS += lint64 78 79 COMMON_INCLUDES = -I$(HDRS_DIR) 80 COMMON_INCLUDES += -I$(COM_INC_ISCSI) 81 COMMON_INCLUDES += -I$(COMMON_ISCSI_IMPL_HDRS_DIR) 82 83 $(BUILD32)ALLPREQ += $(OBJ32) 84 $(BUILD64)ALLPREQ += $(OBJ64) 85 ALLPREQ += .WAIT 86 ALLPREQ += $(BINARIES) 87 88 INSTALLPREQ = all 89 INSTALLPREQ += .WAIT 90 $(BUILD32)INSTALLPREQ += $(STAGING32) 91 $(BUILD64)INSTALLPREQ += $(STAGING64) 92 INSTALLPREQ += .WAIT 93 $(BUILD32)INSTALLPREQ += $(STAGING32)/$(MODULE) 94 $(BUILD64)INSTALLPREQ += $(STAGING64)/$(MODULE) 95 96 PKGPREQ = install 97 PKGPREQ += .WAIT 98 PKGPREQ += $(PKG_PROJ_DEPENDS:%=%_installed) 99 PKGPREQ += $(PKGAREA) 100 PKGPREQ += .WAIT 101 PKGPREQ += $(MODULE_PKGS:%=$(PKGAREA)/%) 102 103 CLEANFILES = $(MODULE_OBJ_32) $(MODULE_OBJ_64) 104 105 CLEANWARFILES = idm.ll 106 CLEANWARFILES += idm.ok 107 108 CLOBBERFILES = $(CLEANFILES) 109 CLOBBERFILES += $(CLEANWARFILES) 110 CLOBBERFILES += $(MOD_LINT_LIB) 111 112 NUKEFILES = $(CLOBBERFILES) 113 NUKEFILES += $(STAGING32)/$(MODULE) 114 NUKEFILES += $(STAGING64)/$(MODULE) 115 NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%) 116 117 include ../Makefile.common 118 119 # 120 # Builddate 121 # 122 BUILD_DATE:sh= date +%\Y%m%d 123 CPPFLAGS32 += -DBUILD_DATE=\"$(BUILD_DATE)\" 124 CPPFLAGS64 += -DBUILD_DATE=\"$(BUILD_DATE)\" 125