usr/src/uts/intel/zfs/Makefile
author ahrens
Mon, 31 Oct 2005 11:33:35 -0800
changeset 789 b348f31ed315
child 3066 2a2af34f0642
permissions -rw-r--r--
PSARC 2002/240 ZFS 6338653 Integrate ZFS PSARC 2004/652 - DKIOCFLUSH 5096886 Write caching disks need mechanism to flush cache to physical media
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
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     5
# Common Development and Distribution License, Version 1.0 only
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     6
# (the "License").  You may not use this file except in compliance
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     7
# with the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     8
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    11
# See the License for the specific language governing permissions
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    12
# and limitations under the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    13
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    19
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    20
# CDDL HEADER END
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    21
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    22
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    23
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    24
# Use is subject to license terms.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    25
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    26
#ident	"%Z%%M%	%I%	%E% SMI"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    27
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    28
#	This makefile drives the production of the zfs file system
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    29
#	kernel module.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    30
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    31
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    32
#	Path to the base of the uts directory tree (usually /usr/src/uts).
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    33
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    34
UTSBASE	= ../..
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    35
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    36
ARCHDIR:sh = cd ..; basename `pwd`
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    37
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    38
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    39
#	Define the module and object file sets.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    40
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    41
MODULE		= zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    42
OBJECTS		= $(ZFS_OBJS:%=$(OBJS_DIR)/%)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    43
LINTS		= $(ZFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    44
ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    45
ROOTLINK	= $(ROOT_FS_DIR)/$(MODULE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    46
CONF_SRCDIR	= $(UTSBASE)/common/fs/zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    47
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    48
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    49
#	Include common rules.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    50
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    51
include ../Makefile.$(ARCHDIR)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    52
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    53
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    54
#	Define targets
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    55
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    56
ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    57
LINT_TARGET	= $(MODULE).lint
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    58
INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    59
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    60
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    61
#	Overrides and depends_on
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    62
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    63
MODSTUBS_DIR	 = $(OBJS_DIR)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    64
LDFLAGS		+= -dy -Nfs/specfs -Ndrv/random
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    65
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    66
INC_PATH	+= -I$(UTSBASE)/common/fs/zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    67
INC_PATH	+= -I$(SRC)/common
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    68
INC_PATH	+= -I$(COMMONBASE)/zfs
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    69
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    70
C99MODE=	-xc99=%all
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    71
C99LMODE=	-Xc99=%all
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    72
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    73
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    74
#	Default build targets.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    75
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    76
.KEEP_STATE:
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    77
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    78
def:		$(DEF_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    79
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    80
all:		$(ALL_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    81
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    82
clean:		$(CLEAN_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    83
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    84
clobber:	$(CLOBBER_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    85
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    86
lint:		$(LINT_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    87
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    88
modlintlib:	$(MODLINTLIB_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    89
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    90
clean.lint:	$(CLEAN_LINT_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    91
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    92
install:	$(INSTALL_DEPS)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    93
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    94
$(ROOTLINK):	$(ROOT_FS_DIR) $(ROOTMODULE)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    95
	-$(RM) $@; ln $(ROOTMODULE) $@
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    96
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    97
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    98
#	Include common targets.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    99
#
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   100
include ../Makefile.targ