1a18c35b9SAndreas Jaekel# 2a18c35b9SAndreas Jaekel# CDDL HEADER START 3a18c35b9SAndreas Jaekel# 4a18c35b9SAndreas Jaekel# The contents of this file are subject to the terms of the 5a18c35b9SAndreas Jaekel# Common Development and Distribution License (the "License"). 6a18c35b9SAndreas Jaekel# You may not use this file except in compliance with the License. 7a18c35b9SAndreas Jaekel# 8a18c35b9SAndreas Jaekel# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9a18c35b9SAndreas Jaekel# or http://www.opensolaris.org/os/licensing. 10a18c35b9SAndreas Jaekel# See the License for the specific language governing permissions 11a18c35b9SAndreas Jaekel# and limitations under the License. 12a18c35b9SAndreas Jaekel# 13a18c35b9SAndreas Jaekel# When distributing Covered Code, include this CDDL HEADER in each 14a18c35b9SAndreas Jaekel# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15a18c35b9SAndreas Jaekel# If applicable, add the following below this CDDL HEADER, with the 16a18c35b9SAndreas Jaekel# fields enclosed by brackets "[]" replaced with your own identifying 17a18c35b9SAndreas Jaekel# information: Portions Copyright [yyyy] [name of copyright owner] 18a18c35b9SAndreas Jaekel# 19a18c35b9SAndreas Jaekel# CDDL HEADER END 20a18c35b9SAndreas Jaekel# 21a18c35b9SAndreas Jaekel# 22a18c35b9SAndreas Jaekel# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 23a18c35b9SAndreas Jaekel# 24a18c35b9SAndreas Jaekel# This makefile drives the production of the zut file system 25a18c35b9SAndreas Jaekel# kernel module. 26a18c35b9SAndreas Jaekel 27a18c35b9SAndreas Jaekel# 28a18c35b9SAndreas Jaekel# Path to the base of the uts directory tree (usually /usr/src/uts). 29a18c35b9SAndreas Jaekel# 30a18c35b9SAndreas JaekelUTSBASE = ../.. 31a18c35b9SAndreas Jaekel 32a18c35b9SAndreas JaekelARCHDIR:sh = cd ..; basename `pwd` 33a18c35b9SAndreas Jaekel 34a18c35b9SAndreas Jaekel# 35a18c35b9SAndreas Jaekel# Define the module and object file sets. 36a18c35b9SAndreas Jaekel# 37a18c35b9SAndreas JaekelMODULE = zev 38a18c35b9SAndreas JaekelOBJECTS = $(ZEV_OBJS:%=$(OBJS_DIR)/%) 39a18c35b9SAndreas JaekelLINTS = $(ZEV_OBJS:%.o=$(LINTS_DIR)/%.ln) 40a18c35b9SAndreas JaekelROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 41a18c35b9SAndreas JaekelCONF_SRCDIR = $(UTSBASE)/common/fs/zev 42a18c35b9SAndreas Jaekel 43a18c35b9SAndreas Jaekel# 44a18c35b9SAndreas Jaekel# Include common rules. 45a18c35b9SAndreas Jaekel# 46a18c35b9SAndreas Jaekelinclude ../Makefile.$(ARCHDIR) 47a18c35b9SAndreas Jaekel 48a18c35b9SAndreas Jaekel# 49a18c35b9SAndreas Jaekel# Define targets 50a18c35b9SAndreas Jaekel# 51a18c35b9SAndreas JaekelALL_TARGET = $(BINARY) $(SRC_CONFILE) 52a18c35b9SAndreas JaekelLINT_TARGET = $(MODULE).lint 53a18c35b9SAndreas JaekelINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 54a18c35b9SAndreas Jaekel 55a18c35b9SAndreas Jaekel# 56a18c35b9SAndreas Jaekel# Overrides and depends_on 57a18c35b9SAndreas Jaekel# 58a18c35b9SAndreas JaekelMODSTUBS_DIR = $(OBJS_DIR) 59*1f47b6c0SAndreas JaekelLDFLAGS += -dy -Nzfs 60a18c35b9SAndreas Jaekel 61a18c35b9SAndreas JaekelINC_PATH += -I$(UTSBASE)/common/fs/zev 62a18c35b9SAndreas JaekelINC_PATH += -I$(UTSBASE)/common/fs/zfs 63a18c35b9SAndreas JaekelINC_PATH += -I$(SRC)/common 64a18c35b9SAndreas JaekelINC_PATH += -I$(COMMONBASE)/zev 65a18c35b9SAndreas JaekelINC_PATH += -I$(COMMONBASE)/zfs 66a18c35b9SAndreas Jaekel 67a18c35b9SAndreas Jaekel 68a18c35b9SAndreas JaekelC99MODE= -xc99=%all 69a18c35b9SAndreas JaekelC99LMODE= -Xc99=%all 70a18c35b9SAndreas Jaekel 71a18c35b9SAndreas Jaekel# 72a18c35b9SAndreas Jaekel# For now, disable these lint checks; maintainers should endeavor 73a18c35b9SAndreas Jaekel# to investigate and remove these for maximum lint coverage. 74a18c35b9SAndreas Jaekel# Please do not carry these forward to new Makefiles. 75a18c35b9SAndreas Jaekel# 76a18c35b9SAndreas JaekelLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 77a18c35b9SAndreas Jaekel 78a18c35b9SAndreas JaekelCERRWARN += -_gcc=-Wno-parentheses 79a18c35b9SAndreas JaekelCERRWARN += -_gcc=-Wno-uninitialized 80a18c35b9SAndreas Jaekel 81a18c35b9SAndreas Jaekel# 82a18c35b9SAndreas Jaekel# Default build targets. 83a18c35b9SAndreas Jaekel# 84a18c35b9SAndreas Jaekel.KEEP_STATE: 85a18c35b9SAndreas Jaekel 86a18c35b9SAndreas Jaekeldef: $(DEF_DEPS) 87a18c35b9SAndreas Jaekel 88a18c35b9SAndreas Jaekelall: $(ALL_DEPS) 89a18c35b9SAndreas Jaekel 90a18c35b9SAndreas Jaekelclean: $(CLEAN_DEPS) 91a18c35b9SAndreas Jaekel 92a18c35b9SAndreas Jaekelclobber: $(CLOBBER_DEPS) 93a18c35b9SAndreas Jaekel 94a18c35b9SAndreas Jaekellint: $(LINT_DEPS) 95a18c35b9SAndreas Jaekel 96a18c35b9SAndreas Jaekelmodlintlib: $(MODLINTLIB_DEPS) 97a18c35b9SAndreas Jaekel 98a18c35b9SAndreas Jaekelclean.lint: $(CLEAN_LINT_DEPS) 99a18c35b9SAndreas Jaekel 100a18c35b9SAndreas Jaekelinstall: $(INSTALL_DEPS) 101a18c35b9SAndreas Jaekel 102a18c35b9SAndreas Jaekel# 103a18c35b9SAndreas Jaekel# Include common targets. 104a18c35b9SAndreas Jaekel# 105a18c35b9SAndreas Jaekelinclude ../Makefile.targ 106