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 # uts/intel/nsmb/Makefile
24 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
29 # intel architecture dependent
33 # Path to the base of the uts directory tree (usually /usr/src/uts).
38 # Define the module and object file sets.
41 OBJECTS
= $(NSMB_OBJS
:%=$(OBJS_DIR
)/%)
42 LINTS
= $(NSMB_OBJS
:%.o
=$(LINTS_DIR
)/%.ln
)
43 ROOTMODULE
= $(USR_DRV_DIR
)/$(MODULE
)
44 CONF_SRCDIR
= $(UTSBASE
)/common
/fs
/smbclnt
/netsmb
45 OFFSETS_SRC
= $(CONF_SRCDIR
)/offsets.in
46 IOC_CHECK_H
= $(OBJS_DIR
)/ioc_check.h
49 # Include common rules.
51 include $(UTSBASE
)/intel
/Makefile.intel
56 ALL_TARGET
= $(ALL_TARGET_
$(OBJS_DIR
))
57 LINT_TARGET
= $(MODULE
).lint
58 INSTALL_TARGET
= $(INSTALL_TARGET_
$(OBJS_DIR
))
63 # We need some unusual overrides here so we'll
64 # build ioc_check.h for both 32-bit/64-bit,
65 # but only build 64-bit binaries.
68 # Build 32-bit also...
69 DEF_BUILDS
= $(DEF_BUILDS64
) $(DEF_BUILDS32
)
70 ALL_BUILDS
= $(ALL_BUILDS64
) $(ALL_BUILDS32
)
71 # ... but don't build any 32-bit objects
72 ALL_TARGET_debug32
= $(IOC_CHECK_H
)
73 ALL_TARGET_debug64
= $(BINARY
) $(SRC_CONFILE
)
74 ALL_TARGET_obj32
= $(IOC_CHECK_H
)
75 ALL_TARGET_obj64
= $(BINARY
) $(SRC_CONFILE
)
76 # ... and remove -xcg92 (not supported by cw)
78 # ... same deal for install targets
79 INSTALL_TARGET_debug32
= $(IOC_CHECK_H
)
80 INSTALL_TARGET_debug64
= $(BINARY
) $(ROOTMODULE
) $(ROOT_CONFFILE
)
81 INSTALL_TARGET_obj32
= $(IOC_CHECK_H
)
82 INSTALL_TARGET_obj64
= $(BINARY
) $(ROOTMODULE
) $(ROOT_CONFFILE
)
85 # Now the normal overrides...
87 MODSTUBS_DIR
= $(OBJS_DIR
)
88 $(MODSTUBS_O
) := AS_CPPFLAGS
+= -DNSMB_MODULE
89 CLEANFILES
+= $(MODSTUBS_O
) $(IOC_CHECK_H
)
90 CERRWARN
+= -erroff
=E_STATEMENT_NOT_REACHED
91 INC_PATH
+= -I
$(UTSBASE
)/common
/fs
/smbclnt
92 LDFLAGS
+= -dy
-Ncrypto
/md4
-Ncrypto
/md5
-Nmisc
/tlimod
94 # Until CR 4994570 is fixed...
95 LINTTAGS
+= -erroff
=E_BAD_FORMAT_ARG_TYPE2
97 # The mb_put/md_get functions are intentionally used with and without
98 # return value checks, so filter those out like LGREP.2 does.
99 LGREP.nsmb
= egrep
-v
' ignored: (mb_init|mb_put|md_get)'
100 LTAIL
+= 2>&1 |
$(LGREP
.2) |
$(LGREP.nsmb
) || true
103 # Default build targets.
113 clobber: $(CLOBBER_DEPS
)
117 modlintlib
: $(MODLINTLIB_DEPS
)
119 clean.lint
: $(CLEAN_LINT_DEPS
)
121 install: $(INSTALL_DEPS
)
124 # Create ioc_check.h and compare with the saved
125 # ioc_check.ref to ensure 32/64-bit invariance.
127 $(OBJECTS
) : $(IOC_CHECK_H
)
128 $(IOC_CHECK_H
): $(OFFSETS_SRC
)
129 $(OFFSETS_CREATE
) <$(OFFSETS_SRC
) >$@.tmp
130 cmp
-s ioc_check.ref
$@.tmp
&& \
134 # Include common targets.
136 include $(UTSBASE
)/intel
/Makefile.targ