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