14bff34e3Sthurlow# 24bff34e3Sthurlow# CDDL HEADER START 34bff34e3Sthurlow# 44bff34e3Sthurlow# The contents of this file are subject to the terms of the 54bff34e3Sthurlow# Common Development and Distribution License (the "License"). 64bff34e3Sthurlow# You may not use this file except in compliance with the License. 74bff34e3Sthurlow# 84bff34e3Sthurlow# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 94bff34e3Sthurlow# or http://www.opensolaris.org/os/licensing. 104bff34e3Sthurlow# See the License for the specific language governing permissions 114bff34e3Sthurlow# and limitations under the License. 124bff34e3Sthurlow# 134bff34e3Sthurlow# When distributing Covered Code, include this CDDL HEADER in each 144bff34e3Sthurlow# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 154bff34e3Sthurlow# If applicable, add the following below this CDDL HEADER, with the 164bff34e3Sthurlow# fields enclosed by brackets "[]" replaced with your own identifying 174bff34e3Sthurlow# information: Portions Copyright [yyyy] [name of copyright owner] 184bff34e3Sthurlow# 194bff34e3Sthurlow# CDDL HEADER END 204bff34e3Sthurlow# 214bff34e3Sthurlow# 224bff34e3Sthurlow# uts/intel/nsmb/Makefile 234bff34e3Sthurlow# 24613a2f6bSGordon Ross# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 254bff34e3Sthurlow# Use is subject to license terms. 264bff34e3Sthurlow# 27b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc. 28*8f469606SGordon Ross# Copyright 2024 RackTop Systems, Inc. 29613a2f6bSGordon Ross 304bff34e3Sthurlow# 314bff34e3Sthurlow# intel architecture dependent 324bff34e3Sthurlow# 334bff34e3Sthurlow 344bff34e3Sthurlow# 354bff34e3Sthurlow# Path to the base of the uts directory tree (usually /usr/src/uts). 364bff34e3Sthurlow# 374bff34e3SthurlowUTSBASE = ../.. 384bff34e3Sthurlow 394bff34e3Sthurlow# 404bff34e3Sthurlow# Define the module and object file sets. 414bff34e3Sthurlow# 424bff34e3SthurlowMODULE = nsmb 434bff34e3SthurlowOBJECTS = $(NSMB_OBJS:%=$(OBJS_DIR)/%) 444bff34e3SthurlowROOTMODULE = $(USR_DRV_DIR)/$(MODULE) 454bff34e3SthurlowCONF_SRCDIR = $(UTSBASE)/common/fs/smbclnt/netsmb 464bff34e3SthurlowOFFSETS_SRC = $(CONF_SRCDIR)/offsets.in 474bff34e3SthurlowIOC_CHECK_H = $(OBJS_DIR)/ioc_check.h 484bff34e3Sthurlow 49*8f469606SGordon Ross# What symbols we export (e.g. _init(), ...) 50*8f469606SGordon RossMAPFILE = $(CONF_SRCDIR)/$(MODULE).mapfile 51*8f469606SGordon Ross 52*8f469606SGordon Ross# The symbols we link against 53*8f469606SGordon RossMAPFILE_EXT = $(CONF_SRCDIR)/nsmb_ext.mapfile 54*8f469606SGordon RossMAPFILES += tlimod ddi 55*8f469606SGordon Ross 564bff34e3Sthurlow# 574bff34e3Sthurlow# Include common rules. 584bff34e3Sthurlow# 594bff34e3Sthurlowinclude $(UTSBASE)/intel/Makefile.intel 604bff34e3Sthurlow 614bff34e3Sthurlow# 624bff34e3Sthurlow# Define targets 634bff34e3Sthurlow# 64bbbed746SGordon RossALL_TARGET = $(ALL_TARGET_$(OBJS_DIR)) 65bbbed746SGordon RossINSTALL_TARGET = $(INSTALL_TARGET_$(OBJS_DIR)) 664bff34e3Sthurlow 674bff34e3Sthurlow# 684bff34e3Sthurlow# Overrides. 694bff34e3Sthurlow# 70bbbed746SGordon Ross# We need some unusual overrides here so we'll 71bbbed746SGordon Ross# build ioc_check.h for both 32-bit/64-bit, 72bbbed746SGordon Ross# but only build 64-bit binaries. 73bbbed746SGordon Ross# 74bbbed746SGordon Ross 75bbbed746SGordon Ross# Build 32-bit also... 76bbbed746SGordon RossDEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32) 77bbbed746SGordon RossALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32) 78bbbed746SGordon Ross# ... but don't build any 32-bit objects 79bbbed746SGordon RossALL_TARGET_debug32 = $(IOC_CHECK_H) 80bbbed746SGordon RossALL_TARGET_debug64 = $(BINARY) $(SRC_CONFILE) 81bbbed746SGordon RossALL_TARGET_obj32 = $(IOC_CHECK_H) 82bbbed746SGordon RossALL_TARGET_obj64 = $(BINARY) $(SRC_CONFILE) 83bbbed746SGordon Ross# ... and remove -xcg92 (not supported by cw) 84bbbed746SGordon RossCFLAGS_32= 85bbbed746SGordon Ross# ... same deal for install targets 86bbbed746SGordon RossINSTALL_TARGET_debug32 = $(IOC_CHECK_H) 87bbbed746SGordon RossINSTALL_TARGET_debug64 = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 88bbbed746SGordon RossINSTALL_TARGET_obj32 = $(IOC_CHECK_H) 89bbbed746SGordon RossINSTALL_TARGET_obj64 = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 90bbbed746SGordon Ross 91bbbed746SGordon Ross# 92bbbed746SGordon Ross# Now the normal overrides... 93bbbed746SGordon Ross# 9441e0a469SRichard LoweCLEANFILES += $(IOC_CHECK_H) 954bff34e3SthurlowINC_PATH += -I$(UTSBASE)/common/fs/smbclnt 96*8f469606SGordon RossLDFLAGS += -Ncrypto/md4 -Ncrypto/md5 -Nmisc/kcf -Nmisc/tlimod 97*8f469606SGordon RossLDFLAGS += -M $(MAPFILE) -M $(MAPFILE_EXT) 984bff34e3Sthurlow 990aaef2f5SRichard Lowe# 1000aaef2f5SRichard Lowe# For now, disable these warnings; maintainers should endeavor 1010aaef2f5SRichard Lowe# to investigate and remove these for maximum coverage. 1020aaef2f5SRichard Lowe# Please do not carry these forward to new Makefiles. 1030aaef2f5SRichard Lowe# 1044bff34e3Sthurlow 105878eeb1bSGordon Ross# The mb_put/md_get functions are intentionally used with and without 1060aaef2f5SRichard Lowe# return value checks, so filter those. 107b6b206fcSJohn LevonSMOFF += all_func_returns 108b6b206fcSJohn Levon 109b6b206fcSJohn Levon# needs work 110b6b206fcSJohn LevonSMOFF += signed,deref_check 111b6b206fcSJohn Levon 1124bff34e3Sthurlow# 1134bff34e3Sthurlow# Default build targets. 1144bff34e3Sthurlow# 1154bff34e3Sthurlow.KEEP_STATE: 1164bff34e3Sthurlow 1174bff34e3Sthurlowdef: $(DEF_DEPS) 1184bff34e3Sthurlow 1194bff34e3Sthurlowall: $(ALL_DEPS) 1204bff34e3Sthurlow 1214bff34e3Sthurlowclean: $(CLEAN_DEPS) 1224bff34e3Sthurlow 1234bff34e3Sthurlowclobber: $(CLOBBER_DEPS) 1244bff34e3Sthurlow 1254bff34e3Sthurlowinstall: $(INSTALL_DEPS) 1264bff34e3Sthurlow 1274bff34e3Sthurlow# 1284bff34e3Sthurlow# Create ioc_check.h and compare with the saved 1294bff34e3Sthurlow# ioc_check.ref to ensure 32/64-bit invariance. 1304bff34e3Sthurlow# 1314bff34e3Sthurlow$(OBJECTS) : $(IOC_CHECK_H) 1324bff34e3Sthurlow$(IOC_CHECK_H): $(OFFSETS_SRC) 1334bff34e3Sthurlow $(OFFSETS_CREATE) <$(OFFSETS_SRC) >$@.tmp 1344bff34e3Sthurlow cmp -s ioc_check.ref $@.tmp && \ 1354bff34e3Sthurlow mv -f $@.tmp $@ 1364bff34e3Sthurlow 1374bff34e3Sthurlow# 1384bff34e3Sthurlow# Include common targets. 1394bff34e3Sthurlow# 140*8f469606SGordon Rossinclude $(UTSBASE)/Makefile.mapfile 1414bff34e3Sthurlowinclude $(UTSBASE)/intel/Makefile.targ 142