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