1*c0dd49bdSEiji Ota# 2*c0dd49bdSEiji Ota# CDDL HEADER START 3*c0dd49bdSEiji Ota# 4*c0dd49bdSEiji Ota# The contents of this file are subject to the terms of the 5*c0dd49bdSEiji Ota# Common Development and Distribution License (the "License"). 6*c0dd49bdSEiji Ota# You may not use this file except in compliance with the License. 7*c0dd49bdSEiji Ota# 8*c0dd49bdSEiji Ota# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*c0dd49bdSEiji Ota# or http://www.opensolaris.org/os/licensing. 10*c0dd49bdSEiji Ota# See the License for the specific language governing permissions 11*c0dd49bdSEiji Ota# and limitations under the License. 12*c0dd49bdSEiji Ota# 13*c0dd49bdSEiji Ota# When distributing Covered Code, include this CDDL HEADER in each 14*c0dd49bdSEiji Ota# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*c0dd49bdSEiji Ota# If applicable, add the following below this CDDL HEADER, with the 16*c0dd49bdSEiji Ota# fields enclosed by brackets "[]" replaced with your own identifying 17*c0dd49bdSEiji Ota# information: Portions Copyright [yyyy] [name of copyright owner] 18*c0dd49bdSEiji Ota# 19*c0dd49bdSEiji Ota# CDDL HEADER END 20*c0dd49bdSEiji Ota# 21*c0dd49bdSEiji Ota# 22*c0dd49bdSEiji Ota# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 23*c0dd49bdSEiji Ota# 24*c0dd49bdSEiji Ota# This makefile drives the production of the rds driver 25*c0dd49bdSEiji Ota# kernel module. 26*c0dd49bdSEiji Ota# 27*c0dd49bdSEiji Ota# sparc architecture dependent 28*c0dd49bdSEiji Ota# 29*c0dd49bdSEiji Ota 30*c0dd49bdSEiji Ota# 31*c0dd49bdSEiji Ota# Path to the base of the uts directory tree (usually /usr/src/uts). 32*c0dd49bdSEiji Ota# 33*c0dd49bdSEiji OtaUTSBASE = ../.. 34*c0dd49bdSEiji Ota 35*c0dd49bdSEiji Ota# 36*c0dd49bdSEiji Ota# Define the module and object file sets. 37*c0dd49bdSEiji Ota# 38*c0dd49bdSEiji OtaMODULE = rdsv3 39*c0dd49bdSEiji OtaOBJECTS = $(RDSV3_OBJS:%=$(OBJS_DIR)/%) 40*c0dd49bdSEiji OtaLINTS = $(RDSV3_OBJS:%.o=$(LINTS_DIR)/%.ln) 41*c0dd49bdSEiji OtaROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 42*c0dd49bdSEiji OtaCONF_SRCDIR = $(UTSBASE)/common/io/ib/clients/rdsv3 43*c0dd49bdSEiji OtaWARLOCK_OUT = $(RDSV3_OBJS:%.o=%.ll) 44*c0dd49bdSEiji OtaWARLOCK_OK = $(MODULE).ok 45*c0dd49bdSEiji OtaWLCMD_DIR = $(UTSBASE)/common/io/warlock 46*c0dd49bdSEiji Ota 47*c0dd49bdSEiji Ota# 48*c0dd49bdSEiji Ota# Include common rules. 49*c0dd49bdSEiji Ota# 50*c0dd49bdSEiji Otainclude $(UTSBASE)/sparc/Makefile.sparc 51*c0dd49bdSEiji Ota 52*c0dd49bdSEiji Ota# 53*c0dd49bdSEiji Ota# Define targets 54*c0dd49bdSEiji Ota# 55*c0dd49bdSEiji OtaALL_TARGET = $(BINARY) $(SRC_CONFILE) 56*c0dd49bdSEiji OtaLINT_TARGET = $(MODULE).lint 57*c0dd49bdSEiji OtaINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 58*c0dd49bdSEiji Ota 59*c0dd49bdSEiji Ota# 60*c0dd49bdSEiji Ota# lint pass one enforcement and OS version 61*c0dd49bdSEiji Ota# 62*c0dd49bdSEiji OtaCFLAGS += $(CCVERBOSE) 63*c0dd49bdSEiji Ota 64*c0dd49bdSEiji Ota# 65*c0dd49bdSEiji Ota# Disable these lint checks since some errors suppressed here are 66*c0dd49bdSEiji Ota# in the OFED code, but we'd like to keep it as is as much as possible. 67*c0dd49bdSEiji Ota# Note. maintainers should endeavor to investigate and remove these for 68*c0dd49bdSEiji Ota# maximum lint coverage, but please do not carry these forward to new 69*c0dd49bdSEiji Ota# Makefiles blindly. 70*c0dd49bdSEiji Ota# 71*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_STATIC_UNUSED 72*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_CONSTANT_CONDITION 73*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_FUNC_VAR_UNUSED 74*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON 75*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 76*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 77*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_FUNC_SET_NOT_USED 78*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_FUNC_USED_VAR_ARG2 79*c0dd49bdSEiji OtaLINTTAGS += -erroff=E_INCONS_ARG_USED2 80*c0dd49bdSEiji Ota 81*c0dd49bdSEiji OtaLDFLAGS += -dy -Nfs/sockfs -Nmisc/ksocket -Ndrv/ip -Nmisc/ibtl -Nmisc/ibcm -Nmisc/sol_ofs 82*c0dd49bdSEiji Ota 83*c0dd49bdSEiji Ota# 84*c0dd49bdSEiji Ota# Default build targets. 85*c0dd49bdSEiji Ota# 86*c0dd49bdSEiji Ota.KEEP_STATE: 87*c0dd49bdSEiji Ota 88*c0dd49bdSEiji Otadef: $(DEF_DEPS) 89*c0dd49bdSEiji Ota 90*c0dd49bdSEiji Otaall: $(ALL_DEPS) 91*c0dd49bdSEiji Ota 92*c0dd49bdSEiji Otaclean: $(CLEAN_DEPS) 93*c0dd49bdSEiji Ota 94*c0dd49bdSEiji Otaclobber: $(CLOBBER_DEPS) 95*c0dd49bdSEiji Ota 96*c0dd49bdSEiji Otalint: $(LINT_DEPS) 97*c0dd49bdSEiji Ota 98*c0dd49bdSEiji Otamodlintlib: $(MODLINTLIB_DEPS) lint64 99*c0dd49bdSEiji Ota 100*c0dd49bdSEiji Otaclean.lint: $(CLEAN_LINT_DEPS) 101*c0dd49bdSEiji Ota 102*c0dd49bdSEiji Otainstall: $(INSTALL_DEPS) 103*c0dd49bdSEiji Ota 104*c0dd49bdSEiji Ota$(ROOTLINK): $(ROOT_STRMOD_DIR) $(ROOTMODULE) 105*c0dd49bdSEiji Ota -$(RM) $@; ln $(ROOTMODULE) $@ 106*c0dd49bdSEiji Ota 107*c0dd49bdSEiji Ota# 108*c0dd49bdSEiji Ota# Include common targets. 109*c0dd49bdSEiji Ota# 110*c0dd49bdSEiji Otainclude $(UTSBASE)/sparc/Makefile.targ 111*c0dd49bdSEiji Ota 112*c0dd49bdSEiji Ota# 113*c0dd49bdSEiji Ota# Defines for local commands. 114*c0dd49bdSEiji Ota# 115*c0dd49bdSEiji OtaWARLOCK = warlock 116*c0dd49bdSEiji OtaWLCC = wlcc 117*c0dd49bdSEiji OtaTOUCH = touch 118*c0dd49bdSEiji OtaTEST = test 119*c0dd49bdSEiji Ota 120*c0dd49bdSEiji Otawarlock: $(WARLOCK_OK) $(WARLOCK_OUT) 121*c0dd49bdSEiji Ota 122*c0dd49bdSEiji Ota$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/rdsv3.wlcmd warlock_ddi.files 123*c0dd49bdSEiji Ota $(WARLOCK) -c $(WLCMD_DIR)/rdsv3.wlcmd $(WARLOCK_OUT) \ 124*c0dd49bdSEiji Ota -l ../warlock/ddi_dki_impl.ll 125*c0dd49bdSEiji Ota $(TOUCH) $@ 126*c0dd49bdSEiji Ota 127*c0dd49bdSEiji Ota%.ll: $(UTSBASE)/common/io/ib/clients/rdsv3/%.c \ 128*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/ib.h \ 129*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/info.h \ 130*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/loop.h \ 131*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rdma.h \ 132*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rdma_transport.h \ 133*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rds.h \ 134*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rds_rdma.h \ 135*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_atomic.h \ 136*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_debug.h \ 137*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_impl.h \ 138*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_ofed_types.h \ 139*c0dd49bdSEiji Ota $(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_sc.h 140*c0dd49bdSEiji Ota $(WLCC) $(CPPFLAGS) -DDEBUG -Dinline= -o $@ $< 141*c0dd49bdSEiji Ota 142*c0dd49bdSEiji Otawarlock_ddi.files: 143*c0dd49bdSEiji Ota @cd ../warlock; pwd; $(MAKE) warlock 144