xref: /titanic_44/usr/src/uts/sparc/emlxs/Makefile (revision 22f288db255a577a61382cbe06ebbe70b453a49a)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# This makefile drives the production of the emlxs driver kernel module.
26#
27# Path to the base of the uts directory tree (usually /usr/src/uts).
28#
29UTSBASE		= ../../
30COMMON_BASE	= ../../../common
31
32#
33#	Define the module and object file sets.
34#
35MODULE		= emlxs
36OBJECTS		= $(EMLXS_OBJS:%=$(OBJS_DIR)/%)
37LINTS		= $(EMLXS_OBJS:%.o=$(LINTS_DIR)/%.ln)
38ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
39CONF_SRCDIR	= $(UTSBASE)/common/io/fibre-channel/fca/emlxs
40
41#
42#	Include common rules.
43#
44ARCHDIR		= sparc
45include ../Makefile.$(ARCHDIR)
46
47#
48#	Define targets
49#
50ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
51LINT_TARGET	= $(MODULE).lint
52INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
53
54EMLXS_FLAGS             = -DEMLXS_SPARC
55EMLXS_FLAGS             += -DS11
56EMLXS_FLAGS             += -DVERSION=\"11\"
57EMLXS_FLAGS             += -DMACH=\"$(MACH)\"
58EMLXS_CFLAGS            = $(EMLXS_FLAGS)
59EMLXS_LFLAGS            = $(EMLXS_FLAGS)
60CFLAGS	                += $(EMLXS_CFLAGS) -DEMLXS_ARCH=\"64\"
61LINTTAGS                += $(EMLXS_LFLAGS) -DEMLXS_ARCH=\"64\"
62
63
64#
65#	Overrides and depends_on
66#
67INC_PATH	+= -I$(ROOT)/usr/include
68INC_PATH	+= -I$(UTSBASE)/common/sys
69INC_PATH	+= -I$(COMMON_BASE)/bignum
70INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel
71INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/fca
72INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/fca/emlxs
73INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/impl
74INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/ulp
75
76LDFLAGS		+= -dy -Nmisc/md5 -Nmisc/sha1
77LDFLAGS		+= -Nmisc/bignum
78
79#
80# For now, disable these lint checks; maintainers should endeavor
81# to investigate and remove these for maximum lint coverage.
82#
83LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
84LINTTAGS	+= -erroff=E_STATIC_UNUSED
85LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
86LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
87LINTTAGS	+= -erroff=E_INCONS_VAL_TYPE_DECL2
88
89#
90#	Default build targets.
91#
92.KEEP_STATE:
93
94def:		$(DEF_DEPS)
95
96all:		$(ALL_DEPS)
97
98clean:		$(CLEAN_DEPS)
99
100clobber:	$(CLOBBER_DEPS)
101
102lint:		$(LINT_DEPS)
103
104modlintlib:	$(MODLINTLIB_DEPS)
105
106clean.lint:	$(CLEAN_LINT_DEPS)
107
108install:	$(INSTALL_DEPS)
109
110#
111#	Include common targets.
112#
113include ../Makefile.targ
114