Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames#
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames# CDDL HEADER START
5ad238c42b1e159ee8f164515e0c4ee6c727c2fdtrawick#
5ad238c42b1e159ee8f164515e0c4ee6c727c2fdtrawick# The contents of this file are subject to the terms of the
5ad238c42b1e159ee8f164515e0c4ee6c727c2fdtrawick# Common Development and Distribution License (the "License").
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# You may not use this file except in compliance with the License.
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb#
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# or http://www.opensolaris.org/os/licensing.
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# See the License for the specific language governing permissions
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# and limitations under the License.
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb#
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# When distributing Covered Code, include this CDDL HEADER in each
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# If applicable, add the following below this CDDL HEADER, with the
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# fields enclosed by brackets "[]" replaced with your own identifying
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# information: Portions Copyright [yyyy] [name of copyright owner]
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb#
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# CDDL HEADER END
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley#
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley#
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley# Use is subject to license terms.
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley#
1c0b7c3bdace07946457fa7ba04b7f97b6599792rbb# This makefile drives the production of the zfs file system
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolley# kernel module.
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolley
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolley#
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolley# Path to the base of the uts directory tree (usually /usr/src/uts).
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolley#
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolleyUTSBASE = ../..
1c0b7c3bdace07946457fa7ba04b7f97b6599792rbb
17bc0e8f2e3816e25bc8fd3fadf39357340aebd0jerenkrantzARCHDIR:sh = cd ..; basename `pwd`
17bc0e8f2e3816e25bc8fd3fadf39357340aebd0jerenkrantz
17bc0e8f2e3816e25bc8fd3fadf39357340aebd0jerenkrantz#
17bc0e8f2e3816e25bc8fd3fadf39357340aebd0jerenkrantz# Define the module and object file sets.
17bc0e8f2e3816e25bc8fd3fadf39357340aebd0jerenkrantz#
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbbMODULE = zfs
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbbOBJECTS = $(ZFS_OBJS:%=$(OBJS_DIR)/%)
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbbLINTS = $(ZFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbbROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbbROOTLINK = $(ROOT_FS_DIR)/$(MODULE)
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbbCONF_SRCDIR = $(UTSBASE)/common/fs/zfs
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbb
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbb#
cf233fb4b439415a2bf7bab7e622afd994e0bebftrawick# Include common rules.
cf233fb4b439415a2bf7bab7e622afd994e0bebftrawick#
cf233fb4b439415a2bf7bab7e622afd994e0bebftrawickinclude ../Makefile.$(ARCHDIR)
cf233fb4b439415a2bf7bab7e622afd994e0bebftrawick
ae64f3e7385f21ca9d4f30cc7f8702a9ac1034b6trawick#
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames# Define targets
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames#
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesALL_TARGET = $(BINARY) $(SRC_CONFILE)
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesLINT_TARGET = $(MODULE).lint
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE)
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames#
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames# Overrides and depends_on
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames#
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesMODSTUBS_DIR = $(OBJS_DIR)
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesLDFLAGS += -dy -Nfs/specfs -Ncrypto/swrand -Nmisc/idmap -Nmisc/sha2
8d49090fd56a8ce06c7f7135f19e5ff8e24b5ff3gregames
f99bffd6087564cf9c05cc29d1c6b38d94e0ed30gregamesINC_PATH += -I$(UTSBASE)/common/fs/zfs
270609308f247c5e934b400b5f1691c2cca16c61jerenkrantzINC_PATH += -I$(SRC)/common
270609308f247c5e934b400b5f1691c2cca16c61jerenkrantzINC_PATH += -I$(COMMONBASE)/zfs
270609308f247c5e934b400b5f1691c2cca16c61jerenkrantz
8458877c9ba0af86acd590eea531476adde3d02dmartinC99MODE= -xc99=%all
8458877c9ba0af86acd590eea531476adde3d02dmartinC99LMODE= -Xc99=%all
8458877c9ba0af86acd590eea531476adde3d02dmartin
8458877c9ba0af86acd590eea531476adde3d02dmartin#
8458877c9ba0af86acd590eea531476adde3d02dmartin# For now, disable these lint checks; maintainers should endeavor
644be6f54749d2d9950d2c4d2ac448f7af016d26martin# to investigate and remove these for maximum lint coverage.
644be6f54749d2d9950d2c4d2ac448f7af016d26martin# Please do not carry these forward to new Makefiles.
644be6f54749d2d9950d2c4d2ac448f7af016d26martin#
644be6f54749d2d9950d2c4d2ac448f7af016d26martinLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
8458877c9ba0af86acd590eea531476adde3d02dmartinLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
b30b04f639d479b96cc08c43ffa34c92ba275676ianhLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
b30b04f639d479b96cc08c43ffa34c92ba275676ianhLINTTAGS += -erroff=E_STATIC_UNUSED
b30b04f639d479b96cc08c43ffa34c92ba275676ianhLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
c4fbc4018fd2b6716673a38ee27eeb36cba41c5djwoolleyLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
c4fbc4018fd2b6716673a38ee27eeb36cba41c5djwoolley
c4fbc4018fd2b6716673a38ee27eeb36cba41c5djwoolleyCERRWARN += -_gcc=-Wno-type-limits
c4fbc4018fd2b6716673a38ee27eeb36cba41c5djwoolleyCERRWARN += -_gcc=-Wno-switch
f4e4643c309e5b5da60e13f9a25984d54b307caawroweCERRWARN += -_gcc=-Wno-parentheses
f4e4643c309e5b5da60e13f9a25984d54b307caawroweCERRWARN += -_gcc=-Wno-unused-variable
f4e4643c309e5b5da60e13f9a25984d54b307caawroweCERRWARN += -_gcc=-Wno-unused-function
2548497d480c4f3e9b3fe14711bd510aa2157434gregamesCERRWARN += -_gcc=-Wno-unused-label
2548497d480c4f3e9b3fe14711bd510aa2157434gregamesCERRWARN += -_gcc=-Wno-uninitialized
2548497d480c4f3e9b3fe14711bd510aa2157434gregames
ccb5c3af2d491a7cd1c246cd23f0fb083da417fagregames#
0e58e92812f2f679d6bf2ff66cbcfa6c1d1e14bbjerenkrantz# Default build targets.
da6e93dca0222159650783802e23172e3160605egregames#
da6e93dca0222159650783802e23172e3160605egregames.KEEP_STATE:
da6e93dca0222159650783802e23172e3160605egregames
c927e13f298c42251296d33cc1fa3eb8232b843daarondef: $(DEF_DEPS)
c927e13f298c42251296d33cc1fa3eb8232b843daaron
c927e13f298c42251296d33cc1fa3eb8232b843daaronall: $(ALL_DEPS)
c927e13f298c42251296d33cc1fa3eb8232b843daaron
c927e13f298c42251296d33cc1fa3eb8232b843daaronclean: $(CLEAN_DEPS)
9126ed10455a2a98a3a51c68ed1b356e1873e8e6aaron
9126ed10455a2a98a3a51c68ed1b356e1873e8e6aaronclobber: $(CLOBBER_DEPS)
9126ed10455a2a98a3a51c68ed1b356e1873e8e6aaron
9126ed10455a2a98a3a51c68ed1b356e1873e8e6aaronlint: $(LINT_DEPS)
fa3ca21e09bac0dbc2045e9f53963ba46cfed5b1trawick
fa3ca21e09bac0dbc2045e9f53963ba46cfed5b1trawickmodlintlib: $(MODLINTLIB_DEPS)
fa3ca21e09bac0dbc2045e9f53963ba46cfed5b1trawick
fa3ca21e09bac0dbc2045e9f53963ba46cfed5b1trawickclean.lint: $(CLEAN_LINT_DEPS)
18acb2c0df442ead1d075a1a2207cbb197725b14coar
18acb2c0df442ead1d075a1a2207cbb197725b14coarinstall: $(INSTALL_DEPS)
18acb2c0df442ead1d075a1a2207cbb197725b14coar
18acb2c0df442ead1d075a1a2207cbb197725b14coar$(ROOTLINK): $(ROOT_FS_DIR) $(ROOTMODULE)
617f972690d850a52cd4e9ef2f32d356e0fae715aaron -$(RM) $@; ln $(ROOTMODULE) $@
617f972690d850a52cd4e9ef2f32d356e0fae715aaron
617f972690d850a52cd4e9ef2f32d356e0fae715aaron#
617f972690d850a52cd4e9ef2f32d356e0fae715aaron# Include common targets.
617f972690d850a52cd4e9ef2f32d356e0fae715aaron#
9278d5393ef084f4fc6d7ec8641af5959442c157jwoolleyinclude ../Makefile.targ
9278d5393ef084f4fc6d7ec8641af5959442c157jwoolley