xref: /titanic_50/usr/src/uts/sparc/emlxs/Makefile (revision 753a6d457b330b1b29b2d3eefcd0831116ce950d)
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 2008 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
33ARCHDIR:sh = cd ..; basename `pwd`
34
35#
36#	Define the module and object file sets.
37#
38MODULE		= emlxs
39OBJECTS		= $(EMLXS_OBJS:%=$(OBJS_DIR)/%)
40LINTS		= $(EMLXS_OBJS:%.o=$(LINTS_DIR)/%.ln)
41ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42CONF_SRCDIR	= $(UTSBASE)/common/io/fibre-channel/fca/emlxs
43
44#
45#	Include common rules.
46#
47include ../Makefile.$(ARCHDIR)
48
49#
50#	Define targets
51#
52ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
53LINT_TARGET	= $(MODULE).lint
54INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
55
56BUILD_DATE:sh            = date +%\Y%m%d
57BUILD_DATE_TIME:sh       = date +%Y.%m.%d.%H.%M
58
59EMLXS_FLAGS             = -DEMLXS_SPARC
60EMLXS_FLAGS             += -DS11
61EMLXS_FLAGS             += -DVERSION=\"11\"
62EMLXS_FLAGS             += -DMACH=\"$(MACH)\"
63EMLXS_CFLAGS            = $(EMLXS_FLAGS)
64EMLXS_LFLAGS            = $(EMLXS_FLAGS)
65CFLAGS	                += $(EMLXS_CFLAGS) -DEMLXS_ARCH=\"64\"
66LINTTAGS                += $(EMLXS_LFLAGS) -DEMLXS_ARCH=\"64\"
67
68
69#
70#	Overrides and depends_on
71#
72MODSTUBS_DIR	 = $(OBJS_DIR)
73
74INC_PATH	+= -I$(ROOT)/usr/include
75INC_PATH	+= -I$(UTSBASE)/common/sys
76INC_PATH	+= -I$(COMMON_BASE)/bignum
77INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel
78INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/fca
79INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/fca/emlxs
80INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/impl
81INC_PATH	+= -I$(UTSBASE)/common/sys/fibre-channel/ulp
82
83LDFLAGS		+= -dy -Nmisc/md5 -Nmisc/sha1
84LDFLAGS		+= -Nmisc/bignum
85
86C99MODE=	-xc99=%all
87C99LMODE=	-Xc99=%all
88
89#
90# For now, disable these lint checks; maintainers should endeavor
91# to investigate and remove these for maximum lint coverage.
92#
93LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
94LINTTAGS	+= -erroff=E_STATIC_UNUSED
95LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
96LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
97LINTTAGS	+= -erroff=E_INCONS_VAL_TYPE_DECL2
98
99#
100#	Default build targets.
101#
102.KEEP_STATE:
103
104def:		$(DEF_DEPS)
105
106all:		$(ALL_DEPS)
107
108clean:		$(CLEAN_DEPS)
109
110clobber:	$(CLOBBER_DEPS)
111
112lint:		$(LINT_DEPS)
113
114modlintlib:	$(MODLINTLIB_DEPS)
115
116clean.lint:	$(CLEAN_LINT_DEPS)
117
118install:	$(INSTALL_DEPS)
119
120#
121#	Include common targets.
122#
123include ../Makefile.targ
124