xref: /illumos-gate/usr/src/uts/intel/chxge/Makefile (revision fd5e5f43)
1d39a76e7Sxw161283# CDDL HEADER START
2d39a76e7Sxw161283#
3d39a76e7Sxw161283# The contents of this file are subject to the terms of the
4d39a76e7Sxw161283# Common Development and Distribution License (the "License").
5d39a76e7Sxw161283# You may not use this file except in compliance with the License.
6d39a76e7Sxw161283#
7d39a76e7Sxw161283# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8d39a76e7Sxw161283# or http://www.opensolaris.org/os/licensing.
9d39a76e7Sxw161283# See the License for the specific language governing permissions
10d39a76e7Sxw161283# and limitations under the License.
11d39a76e7Sxw161283#
12d39a76e7Sxw161283# When distributing Covered Code, include this CDDL HEADER in each
13d39a76e7Sxw161283# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14d39a76e7Sxw161283# If applicable, add the following below this CDDL HEADER, with the
15d39a76e7Sxw161283# fields enclosed by brackets "[]" replaced with your own identifying
16d39a76e7Sxw161283# information: Portions Copyright [yyyy] [name of copyright owner]
17d39a76e7Sxw161283#
18d39a76e7Sxw161283# CDDL HEADER END
19d39a76e7Sxw161283#
20d39a76e7Sxw161283
21d39a76e7Sxw161283#
22d39a76e7Sxw161283# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23d39a76e7Sxw161283# Use is subject to license terms.
24ec71f88eSPatrick Mooney# Copyright 2018 Joyent, Inc.
25d39a76e7Sxw161283#
26b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc.
277014882cSRichard Lowe
28d39a76e7Sxw161283#
29d39a76e7Sxw161283#	This makefile drives the production of the Chelsio N110
30d39a76e7Sxw161283#	10G Ethernet (CH) driver module in x86 systems
31d39a76e7Sxw161283#
32d39a76e7Sxw161283
33d39a76e7Sxw161283#
34d39a76e7Sxw161283#	Paths to the base of the uts directory trees
35d39a76e7Sxw161283#
36d39a76e7Sxw161283UTSBASE   = ../..
37d39a76e7Sxw161283
38d39a76e7Sxw161283#
39d39a76e7Sxw161283#	Define the module and object file sets.
40d39a76e7Sxw161283#
41d39a76e7Sxw161283MODULE		= chxge
42d39a76e7Sxw161283OBJECTS		= $(CH_OBJS:%=$(OBJS_DIR)/%) $(CH_COM_OBJS:%=$(OBJS_DIR)/%)
43d39a76e7Sxw161283ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44d39a76e7Sxw161283
45d39a76e7Sxw161283#
46d39a76e7Sxw161283#	Include common rules.
47d39a76e7Sxw161283#
48d39a76e7Sxw161283include $(UTSBASE)/intel/Makefile.intel
49d39a76e7Sxw161283
50d39a76e7Sxw161283#
51d39a76e7Sxw161283#	Define targets
52d39a76e7Sxw161283#
53d39a76e7Sxw161283ALL_TARGET	= $(BINARY)
54d39a76e7Sxw161283INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
55d39a76e7Sxw161283
56d39a76e7Sxw161283CFLAGS		+= -DC99_NOT_SUPPORTED -DCONFIG_CHELSIO_T1_1G \
57d39a76e7Sxw161283		-I$(UTSBASE)/common/io/chxge/ \
58d39a76e7Sxw161283		-I$(UTSBASE)/common/io/chxge/com
59d39a76e7Sxw161283
60d39a76e7Sxw161283CFLAGS		+= -DCONFIG_SMP
61d39a76e7Sxw161283
62d39a76e7Sxw161283CFLAGS		+= -DRX_MAX_COUNT=256
63d39a76e7Sxw161283
64d39a76e7Sxw161283CFLAGS		+= -DCONFIG_CHELSIO_T1_OFFLOAD
65d39a76e7Sxw161283
66d39a76e7Sxw161283CFLAGS		+= -DSUN_KSTATS -DHOST_PAUSE -DTX_CKSUM_FIX -DTX_THREAD_RECLAIM
67d39a76e7Sxw161283
68d39a76e7Sxw161283#	Debug flags
69d39a76e7Sxw161283# CFLAGS		+= -DCH_DEBUG=1 -DPE_DBGOUT_ENABLED=1
70d39a76e7Sxw161283
71d39a76e7Sxw161283#
72ec71f88eSPatrick Mooney#	Driver depends on GLD, IP, and MAC
73d39a76e7Sxw161283#
7482d0151aSRichard LoweLDFLAGS		+= -N misc/gld -N drv/ip -N misc/mac
75d39a76e7Sxw161283
76d39a76e7Sxw161283
77d39a76e7Sxw161283#
780aaef2f5SRichard Lowe# For now, disable these warnings; maintainers should endeavor
790aaef2f5SRichard Lowe# to investigate and remove these for maximum coverage.
80d39a76e7Sxw161283# Please do not carry these forward to new Makefiles.
81d39a76e7Sxw161283#
827014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
837014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-function
847014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
857014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
86*fd5e5f43SAndy FiddamanCCWARNINLINE	=
877014882cSRichard Lowe
88b6b206fcSJohn LevonSMOFF += indenting,all_func_returns,no_if_block
89b6b206fcSJohn Levon
90b6b206fcSJohn Levon# needs work
91b6b206fcSJohn Levon$(OBJS_DIR)/sge.o := SMOFF += index_overflow
92b6b206fcSJohn Levon
93d39a76e7Sxw161283#
94d39a76e7Sxw161283#
95d39a76e7Sxw161283#	Default build targets.
96d39a76e7Sxw161283#
97d39a76e7Sxw161283.KEEP_STATE:
98d39a76e7Sxw161283
99d39a76e7Sxw161283def:		$(DEF_DEPS)
100d39a76e7Sxw161283
101d39a76e7Sxw161283all:		$(ALL_DEPS)
102d39a76e7Sxw161283
103d39a76e7Sxw161283clean:		$(CLEAN_DEPS)
104d39a76e7Sxw161283
105d39a76e7Sxw161283clobber:	$(CLOBBER_DEPS)
106d39a76e7Sxw161283
107d39a76e7Sxw161283install:	$(INSTALL_DEPS)
108d39a76e7Sxw161283
109d39a76e7Sxw161283#
110d39a76e7Sxw161283#	Include common targets.
111d39a76e7Sxw161283#
112d39a76e7Sxw161283include $(UTSBASE)/intel/Makefile.targ
113