usr/src/uts/intel/zfs/Makefile
author gw25295
Fri, 11 Apr 2008 18:36:28 -0700
changeset 6423 437422a29d3a
parent 5331 3047ad28a67b
child 11328 9e61ee22688a
permissions -rw-r--r--
PSARC 2006/370 ZFS Boot Support 5008936 ZFS and/or zvol should support dumps 5070124 dumpadm -d /dev/... does not enforce block device requirement for savecore 6521468 ZFS Boot support Phase 2 6553503 bfu can't find 'rootdev' from /etc/vfstab on a zfs root filesystem 6574993 zfs_mountroot() may need to call clkset() to set the boot_time kstat 6633197 zvol should not permit newfs or createpool while it's in use by swap or dump 6661127 zfs_name_valid() does not support ZFS_TYPE_POOL 6684121 The changes to smf scripts for supporting canmount=noauto will cause a boot failure.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     1
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     2
# CDDL HEADER START
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     3
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
3066
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
     5
# Common Development and Distribution License (the "License").
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
     6
# You may not use this file except in compliance with the License.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     7
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    11
# and limitations under the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    12
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    18
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    19
# CDDL HEADER END
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    20
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    21
#
6423
437422a29d3a PSARC 2006/370 ZFS Boot Support
gw25295
parents: 5331
diff changeset
    22
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    23
# Use is subject to license terms.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    24
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    25
#ident	"%Z%%M%	%I%	%E% SMI"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    26
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    27
#	This makefile drives the production of the zfs file system
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    28
#	kernel module.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    29
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    30
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    31
#	Path to the base of the uts directory tree (usually /usr/src/uts).
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    32
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    33
UTSBASE	= ../..
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    34
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    35
ARCHDIR:sh = cd ..; basename `pwd`
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    36
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    37
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    38
#	Define the module and object file sets.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    39
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    40
MODULE		= zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    41
OBJECTS		= $(ZFS_OBJS:%=$(OBJS_DIR)/%)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    42
LINTS		= $(ZFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    43
ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    44
ROOTLINK	= $(ROOT_FS_DIR)/$(MODULE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    45
CONF_SRCDIR	= $(UTSBASE)/common/fs/zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    46
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    47
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    48
#	Include common rules.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    49
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    50
include ../Makefile.$(ARCHDIR)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    51
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    52
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    53
#	Define targets
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    54
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    55
ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    56
LINT_TARGET	= $(MODULE).lint
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    57
INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    58
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    59
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    60
#	Overrides and depends_on
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    61
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    62
MODSTUBS_DIR	 = $(OBJS_DIR)
6423
437422a29d3a PSARC 2006/370 ZFS Boot Support
gw25295
parents: 5331
diff changeset
    63
LDFLAGS		+= -dy -Nfs/specfs -Ncrypto/swrand -Nmisc/idmap
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    64
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    65
INC_PATH	+= -I$(UTSBASE)/common/fs/zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    66
INC_PATH	+= -I$(SRC)/common
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    67
INC_PATH	+= -I$(COMMONBASE)/zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    68
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    69
C99MODE=	-xc99=%all
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    70
C99LMODE=	-Xc99=%all
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    71
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    72
#
3066
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    73
# For now, disable these lint checks; maintainers should endeavor
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    74
# to investigate and remove these for maximum lint coverage.
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    75
# Please do not carry these forward to new Makefiles.
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    76
#
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    77
LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    78
LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    79
LINTTAGS	+= -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    80
LINTTAGS	+= -erroff=E_STATIC_UNUSED
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    81
LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    82
LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    83
2a2af34f0642 6470037 remove global disable of some potentially useful lint warnings from the kernel lint build
jg
parents: 789
diff changeset
    84
#
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    85
#	Default build targets.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    86
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    87
.KEEP_STATE:
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    88
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    89
def:		$(DEF_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    90
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    91
all:		$(ALL_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    92
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    93
clean:		$(CLEAN_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    94
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    95
clobber:	$(CLOBBER_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    96
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    97
lint:		$(LINT_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    98
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    99
modlintlib:	$(MODLINTLIB_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   100
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   101
clean.lint:	$(CLEAN_LINT_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   102
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   103
install:	$(INSTALL_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   104
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   105
$(ROOTLINK):	$(ROOT_FS_DIR) $(ROOTMODULE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   106
	-$(RM) $@; ln $(ROOTMODULE) $@
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   107
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   108
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   109
#	Include common targets.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   110
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   111
include ../Makefile.targ