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