comm: add -Wall
[unleashed.git] / usr / src / uts / intel / nsmb / Makefile
blob557e5a9879e051de7a26f2db3b603febd9bdcadc
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
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).
35 UTSBASE = ../..
38 # Define the module and object file sets.
40 MODULE = nsmb
41 OBJECTS = $(NSMB_OBJS:%=$(OBJS_DIR)/%)
42 ROOTMODULE = $(USR_DRV_DIR)/$(MODULE)
43 CONF_SRCDIR = $(UTSBASE)/common/fs/smbclnt/netsmb
44 OFFSETS_SRC = $(CONF_SRCDIR)/offsets.in
45 IOC_CHECK_H = $(OBJS_DIR)/ioc_check.h
48 # Include common rules.
50 include $(UTSBASE)/intel/Makefile.intel
53 # Define targets
55 ALL_TARGET = $(ALL_TARGET_$(OBJS_DIR))
56 INSTALL_TARGET = $(INSTALL_TARGET_$(OBJS_DIR))
59 # Overrides.
61 # We need some unusual overrides here so we'll
62 # build ioc_check.h for both 32-bit/64-bit,
63 # but only build 64-bit binaries.
66 # Build 32-bit also...
67 DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
68 ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
69 # ... but don't build any 32-bit objects
70 ALL_TARGET_debug32 = $(IOC_CHECK_H)
71 ALL_TARGET_debug64 = $(BINARY) $(SRC_CONFILE)
72 ALL_TARGET_obj32 = $(IOC_CHECK_H)
73 ALL_TARGET_obj64 = $(BINARY) $(SRC_CONFILE)
74 # ... and remove -xcg92 (not supported by cw)
75 CFLAGS_32=
76 # ... same deal for install targets
77 INSTALL_TARGET_debug32 = $(IOC_CHECK_H)
78 INSTALL_TARGET_debug64 = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
79 INSTALL_TARGET_obj32 = $(IOC_CHECK_H)
80 INSTALL_TARGET_obj64 = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
83 # Now the normal overrides...
85 MODSTUBS_DIR = $(OBJS_DIR)
86 $(MODSTUBS_O) := AS_CPPFLAGS += -DNSMB_MODULE
87 CLEANFILES += $(MODSTUBS_O) $(IOC_CHECK_H)
88 CSTD = $(CSTD_GNU99)
89 INC_PATH += -I$(UTSBASE)/common/fs/smbclnt
90 LDFLAGS += -dy -Ncrypto/md4 -Ncrypto/md5 -Nmisc/tlimod
92 # Until CR 4994570 is fixed...
94 # The mb_put/md_get functions are intentionally used with and without
95 # return value checks, so filter those out like LGREP.2 does.
96 LGREP.nsmb = egrep -v ' ignored: (mb_init|mb_put|md_get)'
97 LTAIL += 2>&1 | $(LGREP.2) | $(LGREP.nsmb) || true
100 # Default build targets.
102 .KEEP_STATE:
104 def: $(DEF_DEPS)
106 all: $(ALL_DEPS)
108 clean: $(CLEAN_DEPS)
110 clobber: $(CLOBBER_DEPS)
112 install: $(INSTALL_DEPS)
115 # Create ioc_check.h and compare with the saved
116 # ioc_check.ref to ensure 32/64-bit invariance.
118 $(OBJECTS) : $(IOC_CHECK_H)
119 $(IOC_CHECK_H): $(OFFSETS_SRC)
120 $(OFFSETS_CREATE) <$(OFFSETS_SRC) >$@.tmp
121 cmp -s ioc_check.ref $@.tmp && \
122 mv -f $@.tmp $@
125 # Include common targets.
127 include $(UTSBASE)/intel/Makefile.targ