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 2005 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 #ident "@(#)Makefile 1.9 05/10/14 SMI" 27 # 28 # src/sun_nws/fcp/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 = fcp 54 CONFFILE = fcp.conf 55 MODULE_PKGS = SUNWfcp 56 MODULE_SRC = fcp.c 57 58 # Kernel Module Dependencies 59 # -------------------------- 60 LDFLAGS += -dy -Nmisc/fctl -Nmisc/scsi 61 62 # Module Object Files 63 # ------------------- 64 $(BUILD32)MODULE_OBJ_32 = $(MODULE_SRC:%.c=$(OBJ32)/%.o) 65 $(BUILD64)MODULE_OBJ_64 = $(MODULE_SRC:%.c=$(OBJ64)/%.o) 66 67 # Module Binary Files 68 # ------------------- 69 $(BUILD32)BINARY32 = $(OBJ32)/$(MODULE) 70 $(BUILD64)BINARY64 = $(OBJ64)/$(MODULE) 71 BINARIES = $(BINARY32) $(BINARY64) 72 73 $(BUILD32)LINT_TARGETS = lint32 74 $(BUILD64)LINT_TARGETS += lint64 75 76 COMMON_INCLUDES = -I$(MOD_INC_FCTL) 77 COMMON_INCLUDES += -I$(COM_INC_FC) 78 COMMON_INCLUDES += -I$(COMMON_FC_IMPL_HDRS_DIR) 79 80 $(BUILD32)ALLPREQ += $(OBJ32) 81 $(BUILD64)ALLPREQ += $(OBJ64) 82 ALLPREQ += .WAIT 83 ALLPREQ += $(BINARIES) 84 85 INSTALLPREQ = all 86 INSTALLPREQ += .WAIT 87 $(BUILD32)INSTALLPREQ += $(STAGING32) 88 $(BUILD64)INSTALLPREQ += $(STAGING64) 89 INSTALLPREQ += .WAIT 90 INSTALLPREQ += $(STAGING32)/$(CONFFILE) 91 $(BUILD32)INSTALLPREQ += $(STAGING32)/$(MODULE) 92 $(BUILD64)INSTALLPREQ += $(STAGING64)/$(MODULE) 93 94 PKGPREQ = install 95 PKGPREQ += $(PKGAREA) 96 PKGPREQ += .WAIT 97 PKGPREQ += $(MODULE_PKGS:%=$(PKGAREA)/%) 98 99 CLEANFILES = $(MODULE_OBJ_32) $(MODULE_OBJ_64) 100 101 CLEANWARFILES = fcp.ll 102 CLEANWARFILES += fcp.ok 103 104 CLOBBERFILES = $(CLEANFILES) 105 CLOBBERFILES += $(CLEANWARFILES) 106 CLOBBERFILES += $(MOD_LINT_LIB) 107 108 NUKEFILES = $(CLOBBERFILES) 109 NUKEFILES += $(STAGING32)/$(CONFFILE) 110 NUKEFILES += $(STAGING32)/$(MODULE) 111 NUKEFILES += $(STAGING64)/$(MODULE) 112 NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%) 113 114 include ../Makefile.common 115 116 # 117 # Builddate 118 # 119 BUILD_DATE:sh= date +%\Y%m%d 120 CPPFLAGS32 += -DBUILD_DATE=\"$(BUILD_DATE)\" 121 CPPFLAGS64 += -DBUILD_DATE=\"$(BUILD_DATE)\" 122 123