xref: /titanic_44/usr/src/uts/sparc/zfs/Makefile (revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95)
1fa9e4066Sahrens#
2fa9e4066Sahrens# CDDL HEADER START
3fa9e4066Sahrens#
4fa9e4066Sahrens# The contents of this file are subject to the terms of the
5*bb25c06cSjg# Common Development and Distribution License (the "License").
6*bb25c06cSjg# You may not use this file except in compliance with the License.
7fa9e4066Sahrens#
8fa9e4066Sahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9fa9e4066Sahrens# or http://www.opensolaris.org/os/licensing.
10fa9e4066Sahrens# See the License for the specific language governing permissions
11fa9e4066Sahrens# and limitations under the License.
12fa9e4066Sahrens#
13fa9e4066Sahrens# When distributing Covered Code, include this CDDL HEADER in each
14fa9e4066Sahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15fa9e4066Sahrens# If applicable, add the following below this CDDL HEADER, with the
16fa9e4066Sahrens# fields enclosed by brackets "[]" replaced with your own identifying
17fa9e4066Sahrens# information: Portions Copyright [yyyy] [name of copyright owner]
18fa9e4066Sahrens#
19fa9e4066Sahrens# CDDL HEADER END
20fa9e4066Sahrens#
21fa9e4066Sahrens#
22*bb25c06cSjg# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23fa9e4066Sahrens# Use is subject to license terms.
24fa9e4066Sahrens#
25fa9e4066Sahrens#ident	"%Z%%M%	%I%	%E% SMI"
26fa9e4066Sahrens#
27fa9e4066Sahrens#	This makefile drives the production of the zfs file system
28fa9e4066Sahrens#	kernel module.
29fa9e4066Sahrens
30fa9e4066Sahrens#
31fa9e4066Sahrens#	Path to the base of the uts directory tree (usually /usr/src/uts).
32fa9e4066Sahrens#
33fa9e4066SahrensUTSBASE	= ../..
34fa9e4066Sahrens
35fa9e4066SahrensARCHDIR:sh = cd ..; basename `pwd`
36fa9e4066Sahrens
37fa9e4066Sahrens#
38fa9e4066Sahrens#	Define the module and object file sets.
39fa9e4066Sahrens#
40fa9e4066SahrensMODULE		= zfs
41fa9e4066SahrensOBJECTS		= $(ZFS_OBJS:%=$(OBJS_DIR)/%)
42fa9e4066SahrensLINTS		= $(ZFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
43fa9e4066SahrensROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44fa9e4066SahrensROOTLINK	= $(ROOT_FS_DIR)/$(MODULE)
45fa9e4066SahrensCONF_SRCDIR	= $(UTSBASE)/common/fs/zfs
46fa9e4066Sahrens
47fa9e4066Sahrens#
48fa9e4066Sahrens#	Include common rules.
49fa9e4066Sahrens#
50fa9e4066Sahrensinclude ../Makefile.$(ARCHDIR)
51fa9e4066Sahrens
52fa9e4066Sahrens#
53fa9e4066Sahrens#	Define targets
54fa9e4066Sahrens#
55fa9e4066SahrensALL_TARGET	= $(BINARY) $(SRC_CONFILE)
56fa9e4066SahrensLINT_TARGET	= $(MODULE).lint
57fa9e4066SahrensINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE)
58fa9e4066Sahrens
59fa9e4066Sahrens#
60fa9e4066Sahrens#	Overrides and depends_on
61fa9e4066Sahrens#
62fa9e4066SahrensMODSTUBS_DIR	 = $(OBJS_DIR)
63fa9e4066SahrensLDFLAGS		+= -dy -Nfs/specfs -Ndrv/random
64fa9e4066Sahrens
65fa9e4066SahrensINC_PATH	+= -I$(UTSBASE)/common/fs/zfs
66fa9e4066SahrensINC_PATH	+= -I$(SRC)/common
67fa9e4066SahrensINC_PATH	+= -I$(COMMONBASE)/zfs
68fa9e4066Sahrens
69fa9e4066SahrensC99MODE=	-xc99=%all
70fa9e4066SahrensC99LMODE=	-Xc99=%all
71fa9e4066Sahrens
72fa9e4066Sahrens#
73*bb25c06cSjg# For now, disable these lint checks; maintainers should endeavor
74*bb25c06cSjg# to investigate and remove these for maximum lint coverage.
75*bb25c06cSjg# Please do not carry these forward to new Makefiles.
76*bb25c06cSjg#
77*bb25c06cSjgLINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
78*bb25c06cSjgLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
79*bb25c06cSjgLINTTAGS	+= -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
80*bb25c06cSjgLINTTAGS	+= -erroff=E_STATIC_UNUSED
81*bb25c06cSjgLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
82*bb25c06cSjgLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
83*bb25c06cSjg
84*bb25c06cSjg#
85fa9e4066Sahrens#	Default build targets.
86fa9e4066Sahrens#
87fa9e4066Sahrens.KEEP_STATE:
88fa9e4066Sahrens
89fa9e4066Sahrensdef:		$(DEF_DEPS)
90fa9e4066Sahrens
91fa9e4066Sahrensall:		$(ALL_DEPS)
92fa9e4066Sahrens
93fa9e4066Sahrensclean:		$(CLEAN_DEPS)
94fa9e4066Sahrens
95fa9e4066Sahrensclobber:	$(CLOBBER_DEPS)
96fa9e4066Sahrens
97fa9e4066Sahrenslint:		$(LINT_DEPS)
98fa9e4066Sahrens
99fa9e4066Sahrensmodlintlib:	$(MODLINTLIB_DEPS)
100fa9e4066Sahrens
101fa9e4066Sahrensclean.lint:	$(CLEAN_LINT_DEPS)
102fa9e4066Sahrens
103fa9e4066Sahrensinstall:	$(INSTALL_DEPS)
104fa9e4066Sahrens
105fa9e4066Sahrens$(ROOTLINK):	$(ROOT_FS_DIR) $(ROOTMODULE)
106fa9e4066Sahrens	-$(RM) $@; ln $(ROOTMODULE) $@
107fa9e4066Sahrens
108fa9e4066Sahrens#
109fa9e4066Sahrens#	Include common targets.
110fa9e4066Sahrens#
111fa9e4066Sahrensinclude ../Makefile.targ
112