xref: /illumos-gate/usr/src/uts/intel/sfe/Makefile (revision 33efde4275d24731ef87927237b0ffb0630b6b2d)
1f8919bdaSduboff#
2f8919bdaSduboff# CDDL HEADER START
3f8919bdaSduboff#
4f8919bdaSduboff# The contents of this file are subject to the terms of the
5f8919bdaSduboff# Common Development and Distribution License (the "License").
6f8919bdaSduboff# You may not use this file except in compliance with the License.
7f8919bdaSduboff#
8f8919bdaSduboff# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9f8919bdaSduboff# or http://www.opensolaris.org/os/licensing.
10f8919bdaSduboff# See the License for the specific language governing permissions
11f8919bdaSduboff# and limitations under the License.
12f8919bdaSduboff#
13f8919bdaSduboff# When distributing Covered Code, include this CDDL HEADER in each
14f8919bdaSduboff# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15f8919bdaSduboff# If applicable, add the following below this CDDL HEADER, with the
16f8919bdaSduboff# fields enclosed by brackets "[]" replaced with your own identifying
17f8919bdaSduboff# information: Portions Copyright [yyyy] [name of copyright owner]
18f8919bdaSduboff#
19f8919bdaSduboff# CDDL HEADER END
20f8919bdaSduboff#
21f8919bdaSduboff#
2222eb7cb5Sgd78059# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23f8919bdaSduboff# Use is subject to license terms.
24f8919bdaSduboff#
25b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc.
26b6b206fcSJohn Levon
277014882cSRichard Lowe
28f8919bdaSduboff#
29f8919bdaSduboff#	This makefile drives the production of NS/SiS
30f8919bdaSduboff#	Fast Ethernet (SFE) driver module in intel systems
31f8919bdaSduboff#
32f8919bdaSduboff
33f8919bdaSduboff#
34f8919bdaSduboff#	Path to the base of the uts directory tree (usually /usr/src/uts).
35f8919bdaSduboff#
36f8919bdaSduboffUTSBASE		= ../..
37f8919bdaSduboff
38f8919bdaSduboff#
39f8919bdaSduboff#	Define the module and object file sets.
40f8919bdaSduboff#
41f8919bdaSduboffMODULE		= sfe
42f8919bdaSduboffOBJECTS		= $(SFE_OBJS:%=$(OBJS_DIR)/%)
43f8919bdaSduboffROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44f8919bdaSduboff
45f8919bdaSduboff#
46f8919bdaSduboff#	Include common rules.
47f8919bdaSduboff#
48f8919bdaSduboffinclude $(UTSBASE)/intel/Makefile.intel
49f8919bdaSduboff
50f8919bdaSduboff#
51f8919bdaSduboff#	Define targets
52f8919bdaSduboff#
53f8919bdaSduboffALL_TARGET	= $(BINARY)
54f8919bdaSduboffINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
55f8919bdaSduboff
56f8919bdaSduboff#
57f8919bdaSduboff#	GENERAL PURPOUSE GEM FLAGS: Tuning GEM for Solaris specific modes
58f8919bdaSduboff#
59f8919bdaSduboffVFLAGS		= -DVERSION='"2.6.1"'
60f8919bdaSduboffAFLAGS		= -Di86pc
61f8919bdaSduboffDFLAGS		= -D"__INLINE__="
62f8919bdaSduboffCFGFLAGS	= -DGEM_CONFIG_POLLING -DGEM_CONFIG_GLDv3 -DGEM_CONFIG_VLAN \
63f8919bdaSduboff	-DGEM_CONFIG_CKSUM_OFFLOAD -DGEM_CONFIG_ND \
64f8919bdaSduboff	-DCONFIG_DP83815 -DCONFIG_SIS900 -DCONFIG_SIS7016 \
65f8919bdaSduboff	-DCONFIG_MAC_ADDR_SIS630E -DCONFIG_OPT_IO -UCONFIG_OO \
66f8919bdaSduboff	-DCONFIG_PATTERN_MATCH_DP83815
67f8919bdaSduboff#
68f8919bdaSduboff#	FAST PATH SECTION: Will activate usage of inlines as a regular functions
69f8919bdaSduboff#	on fast data path
70f8919bdaSduboff
71f8919bdaSduboffCPPFLAGS	+= $(VFLAGS) $(AFLAGS) $(DFLAGS) $(CFGFLAGS) $(CCVERBOSE) \
72f8919bdaSduboff	-I$(UTSBASE)/common/io/sfe
73f8919bdaSduboff
74bd0ce624SYuri PankovCFLAGS		+= $(CPPFLAGS)
75f8919bdaSduboff
767014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-switch
777014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
78d3b5f563SJohn LevonCERRWARN	+= $(CNOWARN_UNINIT)
797014882cSRichard Lowe
80b6b206fcSJohn Levon# needs work
81b6b206fcSJohn LevonSMOFF += all_func_returns
82b6b206fcSJohn Levon
83f8919bdaSduboff#
84f8919bdaSduboff# Driver depends on MAC & IP
85f8919bdaSduboff#
86*82d0151aSRichard LoweLDFLAGS		+= -N misc/mac -N drv/ip
87f8919bdaSduboff
88f8919bdaSduboff#
89f8919bdaSduboff#	Default build targets.
90f8919bdaSduboff#
91f8919bdaSduboff.KEEP_STATE:
92f8919bdaSduboff
93f8919bdaSduboffdef:		$(DEF_DEPS)
94f8919bdaSduboff
95f8919bdaSduboffall:		$(ALL_DEPS)
96f8919bdaSduboff
97f8919bdaSduboffclean:		$(CLEAN_DEPS)
98f8919bdaSduboff
99f8919bdaSduboffclobber:	$(CLOBBER_DEPS)
100f8919bdaSduboff
101f8919bdaSduboffinstall:	$(INSTALL_DEPS)
102f8919bdaSduboff
103f8919bdaSduboff#
104f8919bdaSduboff#	Include common targets.
105f8919bdaSduboff#
106f8919bdaSduboffinclude $(UTSBASE)/intel/Makefile.targ
107