xref: /illumos-gate/usr/src/uts/intel/e1000g/Makefile (revision d3b5f56344d8bfcdd6cfb82446af0e5e55ad9ebe)
108057504Sxy150489#
208057504Sxy150489# CDDL HEADER START
308057504Sxy150489#
408057504Sxy150489# The contents of this file are subject to the terms of the
508057504Sxy150489# Common Development and Distribution License (the "License").
608057504Sxy150489# You may not use this file except in compliance with the License.
708057504Sxy150489#
808057504Sxy150489# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
908057504Sxy150489# or http://www.opensolaris.org/os/licensing.
1008057504Sxy150489# See the License for the specific language governing permissions
1108057504Sxy150489# and limitations under the License.
1208057504Sxy150489#
1308057504Sxy150489# When distributing Covered Code, include this CDDL HEADER in each
1408057504Sxy150489# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1508057504Sxy150489# If applicable, add the following below this CDDL HEADER, with the
1608057504Sxy150489# fields enclosed by brackets "[]" replaced with your own identifying
1708057504Sxy150489# information: Portions Copyright [yyyy] [name of copyright owner]
1808057504Sxy150489#
1908057504Sxy150489# CDDL HEADER END
2008057504Sxy150489#
2108057504Sxy150489#
224045d941Ssowmini# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2308057504Sxy150489# Use is subject to license terms.
2408057504Sxy150489#
25b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc.
2608057504Sxy150489
2708057504Sxy150489#
2808057504Sxy150489#	Paths to the base of the uts directory trees
2908057504Sxy150489#
3008057504Sxy150489UTSBASE = ../..
3108057504Sxy150489
3208057504Sxy150489#
3308057504Sxy150489#	Define the module and object file sets.
3408057504Sxy150489#
3508057504Sxy150489MODULE		= e1000g
3608057504Sxy150489OBJECTS		= $(E1000G_OBJS:%=$(OBJS_DIR)/%)
3775eba5b6SRobert MustacchiOBJECTS		+= $(E1000API_OBJS:%=$(OBJS_DIR)/%)
3808057504Sxy150489LINTS		= $(E1000G_OBJS:%.o=$(LINTS_DIR)/%.ln)
3908057504Sxy150489ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
4008057504Sxy150489CONF_SRCDIR	= $(UTSBASE)/common/io/e1000g
4108057504Sxy150489
4208057504Sxy150489#
4308057504Sxy150489#	Include common rules.
4408057504Sxy150489#
4508057504Sxy150489include $(UTSBASE)/intel/Makefile.intel
4608057504Sxy150489
4708057504Sxy150489CFLAGS += -D_KERNEL -Di386   -DNEWSTAT -DNOMUT -DRCVWORKAROUND \
4808057504Sxy150489	  -DINTEL_IP \
4908057504Sxy150489	  -DPAXSON  -DBAY_CITY \
5075eba5b6SRobert Mustacchi	  -DTANAX_WORKAROUND -I$(UTSBASE)/common/io/e1000g \
5175eba5b6SRobert Mustacchi	  -I$(UTSBASE)/common/io/e1000api
5275eba5b6SRobert Mustacchi
5375eba5b6SRobert MustacchiLINTFLAGS += \
5475eba5b6SRobert Mustacchi	-I$(UTSBASE)/common/io/e1000g \
5575eba5b6SRobert Mustacchi	-I$(UTSBASE)/common/io/e1000api
5608057504Sxy150489
5708057504Sxy150489CFLAGS_CPP_COMMENTS = -xCC
5808057504Sxy150489
5908057504Sxy150489CFLAGS += $(CFLAGS_CPP_COMMENTS)
6008057504Sxy150489
61*d3b5f563SJohn LevonCERRWARN	+= $(CNOWARN_UNINIT)
627014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
637014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-switch
647014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
657014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
6675eba5b6SRobert MustacchiCERRWARN	+= -_cc=-erroff=E_STATEMENT_NOT_REACHED
677014882cSRichard Lowe
68b6b206fcSJohn LevonSMOFF += all_func_returns,indenting,shift_to_zero
69b6b206fcSJohn Levon
7049b78600SRobert MustacchiLINTTAGS	+= -erroff=E_CONSTANT_CONDITION
7149b78600SRobert Mustacchi
7208057504Sxy150489#
7308057504Sxy150489#	Define targets
7408057504Sxy150489#
7508057504Sxy150489ALL_TARGET	= $(BINARY) $(CONFMOD)
7608057504Sxy150489LINT_TARGET	= $(MODULE).lint
7708057504Sxy150489INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
7808057504Sxy150489
7908057504Sxy150489#
804045d941Ssowmini# Driver depends on MAC
8108057504Sxy150489#
824045d941SsowminiLDFLAGS		+= -dy -N misc/mac
833e3ca1ceSRobert MustacchiMAPFILES	+= ddi mac
8408057504Sxy150489
8508057504Sxy150489#
8608057504Sxy150489#	Default build targets.
8708057504Sxy150489#
8808057504Sxy150489.KEEP_STATE:
8908057504Sxy150489
9008057504Sxy150489def:		$(DEF_DEPS)
9108057504Sxy150489
9208057504Sxy150489all:		$(ALL_DEPS)
9308057504Sxy150489
9408057504Sxy150489clean:		$(CLEAN_DEPS)
9508057504Sxy150489
9608057504Sxy150489clobber:	$(CLOBBER_DEPS)
9708057504Sxy150489
9808057504Sxy150489
99fe62dec3SChen-Liang Xulint:		$(LINT_DEPS)
10008057504Sxy150489
101fe62dec3SChen-Liang Xumodlintlib:	$(MODLINTLIB_DEPS)
10208057504Sxy150489
10308057504Sxy150489clean.lint:	$(CLEAN_LINT_DEPS)
10408057504Sxy150489
10508057504Sxy150489install:	$(INSTALL_DEPS)
10608057504Sxy150489
10708057504Sxy150489#
10808057504Sxy150489#	Include common targets.
10908057504Sxy150489#
1103e3ca1ceSRobert Mustacchiinclude $(UTSBASE)/Makefile.mapfile
11108057504Sxy150489include $(UTSBASE)/intel/Makefile.targ
112