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.
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.
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]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 # Copyright (c) 2011 Bayard G. Bell. All rights reserved.
25 # Copyright (c) 2018, Joyent, Inc.
27 # This makefile drives the production of the emlxs driver kernel module.
29 # Path to the base of the uts directory tree (usually /usr/src/uts).
32 COMMON_BASE
= ..
/..
/..
/common
35 # Define the module and object file sets.
38 OBJECTS
= $(EMLXS_OBJS
:%=$(OBJS_DIR
)/%)
39 ROOTMODULE
= $(ROOT_DRV_DIR
)/$(MODULE
)
40 CONF_SRCDIR
= $(UTSBASE
)/common
/io
/fibre-channel
/fca
/emlxs
43 # Include common rules.
46 include ..
/Makefile.
$(ARCHDIR
)
51 ALL_TARGET
= $(BINARY
) $(SRC_CONFFILE
)
52 INSTALL_TARGET
= $(BINARY
) $(ROOTMODULE
) $(ROOT_CONFFILE
)
54 EMLXS_FLAGS
= -DEMLXS_I386
56 EMLXS_FLAGS
+= -DVERSION
=\"11\"
57 EMLXS_FLAGS
+= -DMACH
=\"$(MACH
)\"
58 EMLXS_CFLAGS
= $(EMLXS_FLAGS
)
59 EMLXS_LFLAGS
= $(EMLXS_FLAGS
)
60 CFLAGS
+= $(EMLXS_CFLAGS
) -DEMLXS_ARCH
=\"$(CLASS
)\"
64 # Overrides and depends_on
66 INC_PATH
+= -I
$(ROOT
)/usr
/include
67 INC_PATH
+= -I
$(SRCTOP
)/include/sys
68 INC_PATH
+= -I
$(COMMON_BASE
)/bignum
69 INC_PATH
+= -I
$(SRCTOP
)/include/sys
/fibre-channel
70 INC_PATH
+= -I
$(SRCTOP
)/include/sys
/fibre-channel
/fca
71 INC_PATH
+= -I
$(SRCTOP
)/include/sys
/fibre-channel
/fca
/emlxs
72 INC_PATH
+= -I
$(SRCTOP
)/include/sys
/fibre-channel
/impl
73 INC_PATH
+= -I
$(SRCTOP
)/include/sys
/fibre-channel
/ulp
76 # misc/fctl required because #ifdef MODSYM_LOAD code
77 # triggered by -DS11; uses DDI calls to load FCA symbols
79 LDFLAGS
+= -dy
-Nmisc
/md5
-Nmisc
/sha1
80 LDFLAGS
+= -Nmisc
/bignum
-Nmisc
/fctl
83 # For now, disable these compiler warnings; maintainers should endeavor to
84 # investigate and remove these for maximum coverage. Please do not carry
87 CERRWARN
+= -Wno-parentheses
88 CERRWARN
+= -Wno-unused-label
89 CERRWARN
+= -Wno-uninitialized
91 SMOFF
+= indenting
,deref_check
,all_func_returns
93 # seems definitely wrong
94 $(OBJS_DIR
)/emlxs_fcf.o
:= SMOFF
+= logical_instead_of_bitwise
97 # Default build targets.
107 clobber: $(CLOBBER_DEPS
)
109 install: $(INSTALL_DEPS
)
112 # Include common targets.
114 include ..
/Makefile.targ