xref: /titanic_44/usr/src/uts/intel/eoib/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1b494511aSVenki Rajagopalan#
2b494511aSVenki Rajagopalan# CDDL HEADER START
3b494511aSVenki Rajagopalan#
4b494511aSVenki Rajagopalan# The contents of this file are subject to the terms of the
5b494511aSVenki Rajagopalan# Common Development and Distribution License (the "License").
6b494511aSVenki Rajagopalan# You may not use this file except in compliance with the License.
7b494511aSVenki Rajagopalan#
8b494511aSVenki Rajagopalan# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9b494511aSVenki Rajagopalan# or http://www.opensolaris.org/os/licensing.
10b494511aSVenki Rajagopalan# See the License for the specific language governing permissions
11b494511aSVenki Rajagopalan# and limitations under the License.
12b494511aSVenki Rajagopalan#
13b494511aSVenki Rajagopalan# When distributing Covered Code, include this CDDL HEADER in each
14b494511aSVenki Rajagopalan# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15b494511aSVenki Rajagopalan# If applicable, add the following below this CDDL HEADER, with the
16b494511aSVenki Rajagopalan# fields enclosed by brackets "[]" replaced with your own identifying
17b494511aSVenki Rajagopalan# information: Portions Copyright [yyyy] [name of copyright owner]
18b494511aSVenki Rajagopalan#
19b494511aSVenki Rajagopalan# CDDL HEADER END
20b494511aSVenki Rajagopalan#
21b494511aSVenki Rajagopalan
22b494511aSVenki Rajagopalan#
23b494511aSVenki Rajagopalan# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24b494511aSVenki Rajagopalan#
25b494511aSVenki Rajagopalan
26b494511aSVenki Rajagopalan#
27b494511aSVenki Rajagopalan# This makefile drives the production of the EoIB Nexus driver
28b494511aSVenki Rajagopalan#
29b494511aSVenki Rajagopalan# intel architecture dependent
30b494511aSVenki Rajagopalan#
31b494511aSVenki Rajagopalan
32b494511aSVenki Rajagopalan#
33b494511aSVenki Rajagopalan# Path to the base of the uts directory tree (usually /usr/src/uts)
34b494511aSVenki Rajagopalan#
35b494511aSVenki RajagopalanUTSBASE	= ../..
36b494511aSVenki Rajagopalan
37b494511aSVenki Rajagopalan#
38b494511aSVenki Rajagopalan# Define the module and object file sets
39b494511aSVenki Rajagopalan#
40b494511aSVenki RajagopalanMODULE		= eoib
41b494511aSVenki RajagopalanOBJECTS		= $(EOIB_OBJS:%=$(OBJS_DIR)/%)
42b494511aSVenki RajagopalanLINTS		= $(EOIB_OBJS:%.o=$(LINTS_DIR)/%.ln)
43b494511aSVenki RajagopalanROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44b494511aSVenki RajagopalanWARLOCK_OUT	= $(EOIB_OBJS:%.o=%.ll)
45b494511aSVenki RajagopalanWARLOCK_OK	= $(MODULE).ok
46b494511aSVenki RajagopalanWLCMD_DIR	= $(UTSBASE)/common/io/warlock
47b494511aSVenki Rajagopalan
48b494511aSVenki Rajagopalan#
49b494511aSVenki Rajagopalan# Include common rules
50b494511aSVenki Rajagopalan#
51b494511aSVenki Rajagopalaninclude $(UTSBASE)/intel/Makefile.intel
52b494511aSVenki Rajagopalan
53b494511aSVenki Rajagopalan#
54b494511aSVenki Rajagopalan# Define targets
55b494511aSVenki Rajagopalan#
56b494511aSVenki RajagopalanALL_TARGET	= $(BINARY)
57b494511aSVenki RajagopalanLINT_TARGET	= $(MODULE).lint
58b494511aSVenki RajagopalanINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
59b494511aSVenki Rajagopalan
60b494511aSVenki Rajagopalan# Module specific debug flag
61b494511aSVenki Rajagopalan#
62b494511aSVenki RajagopalanCPPFLAGS += -DEIB_DEBUG
63b494511aSVenki Rajagopalan
64b494511aSVenki Rajagopalan#
65b494511aSVenki Rajagopalan# Lint pass one enforcement
66b494511aSVenki Rajagopalan#
67b494511aSVenki RajagopalanCFLAGS += $(CCVERBOSE)
68b494511aSVenki Rajagopalan
69*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-switch
70*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
71*7014882cSRichard Lowe
72b494511aSVenki Rajagopalan#
73b494511aSVenki Rajagopalan# Depends on misc/ibtl
74b494511aSVenki Rajagopalan#
75b494511aSVenki RajagopalanLDFLAGS	+= -dy -Nmisc/mac -Nmisc/ibtl -Nmisc/ibcm -Nmisc/ibmf
76b494511aSVenki Rajagopalan
77b494511aSVenki Rajagopalan#
78b494511aSVenki Rajagopalan# Default build targets
79b494511aSVenki Rajagopalan#
80b494511aSVenki Rajagopalan.KEEP_STATE:
81b494511aSVenki Rajagopalan
82b494511aSVenki Rajagopalandef:		$(DEF_DEPS)
83b494511aSVenki Rajagopalan
84b494511aSVenki Rajagopalanall:		$(ALL_DEPS)
85b494511aSVenki Rajagopalan
86b494511aSVenki Rajagopalanclean:		$(CLEAN_DEPS)
87b494511aSVenki Rajagopalan		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
88b494511aSVenki Rajagopalan
89b494511aSVenki Rajagopalanclobber:	$(CLOBBER_DEPS)
90b494511aSVenki Rajagopalan		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
91b494511aSVenki Rajagopalan
92b494511aSVenki Rajagopalanlint:		$(LINT_DEPS)
93b494511aSVenki Rajagopalan
94b494511aSVenki Rajagopalanmodlintlib:	$(MODLINTLIB_DEPS)
95b494511aSVenki Rajagopalan
96b494511aSVenki Rajagopalanclean.lint:	$(CLEAN_LINT_DEPS)
97b494511aSVenki Rajagopalan
98b494511aSVenki Rajagopalaninstall:	$(INSTALL_DEPS)
99b494511aSVenki Rajagopalan
100b494511aSVenki Rajagopalan#
101b494511aSVenki Rajagopalan# Include common targets
102b494511aSVenki Rajagopalan#
103b494511aSVenki Rajagopalaninclude $(UTSBASE)/intel/Makefile.targ
104b494511aSVenki Rajagopalan
105b494511aSVenki Rajagopalan#
106b494511aSVenki Rajagopalan# Defines for local commands
107b494511aSVenki Rajagopalan#
108b494511aSVenki RajagopalanWARLOCK		= warlock
109b494511aSVenki RajagopalanWLCC		= wlcc
110b494511aSVenki RajagopalanTOUCH		= touch
111b494511aSVenki RajagopalanTEST		= test
112b494511aSVenki Rajagopalan
113b494511aSVenki Rajagopalanwarlock: $(WARLOCK_OK)
114b494511aSVenki Rajagopalan
115b494511aSVenki Rajagopalan$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/eoib.wlcmd warlock_ddi.files
116b494511aSVenki Rajagopalan	$(WARLOCK) -c $(WLCMD_DIR)/eoib.wlcmd $(WARLOCK_OUT)  \
117b494511aSVenki Rajagopalan		-l ../warlock/ddi_dki_impl.ll
118b494511aSVenki Rajagopalan	$(TOUCH) $@
119b494511aSVenki Rajagopalan
120b494511aSVenki Rajagopalan%.ll: $(UTSBASE)/common/io/ib/clients/eoib/eib_adm.c \
121b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_chan.c \
122b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_cmn.c \
123b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_ctl.c \
124b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_data.c \
125b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_fip.c \
126b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_ibt.c \
127b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_log.c \
128b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_mac.c \
129b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_main.c \
130b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_rsrc.c \
131b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_svc.c \
132b494511aSVenki Rajagopalan	    $(UTSBASE)/common/io/ib/clients/eoib/eib_vnic.c \
133b494511aSVenki Rajagopalan	    $(UTSBASE)/common/sys/ib/clients/eoib/fip.h \
134b494511aSVenki Rajagopalan	    $(UTSBASE)/common/sys/ib/clients/eoib/eib.h \
135b494511aSVenki Rajagopalan	    $(UTSBASE)/common/sys/ib/clients/eoib/eib_impl.h
136b494511aSVenki Rajagopalan	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
137b494511aSVenki Rajagopalan
138b494511aSVenki Rajagopalanwarlock_ddi.files:
139b494511aSVenki Rajagopalan	@cd ../warlock; pwd; $(MAKE) warlock
140