xref: /titanic_44/usr/src/uts/sparc/bnxe/Makefile (revision e7619b69689d6a40a07425ef14002f2ab4d724d9)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright (c) 2014, Joyent, Inc.  All rights reserved.
14#
15
16#
17# uts/sparc/bnxe/Makefile
18#
19#	This makefile drives the production of the bnxe
20#	driver kernel module.
21#
22#	sparc architecture dependent
23#
24
25#
26#	Paths to the base of the uts directory trees
27#
28UTSBASE = ../..
29
30#
31#	Define the module and object file sets.
32#
33MODULE		= bnxe
34OBJECTS		= $(BNXE_OBJS:%=$(OBJS_DIR)/%)
35LINTS		= $(LINTS_DIR)/bnxe_lint.ln
36ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
37SRCDIR		= $(UTSBASE)/common/io/bnxe
38CONF_SRCDIR	= $(SRCDIR)
39
40#
41#	Include common rules.
42#
43include $(UTSBASE)/sparc/Makefile.sparc
44
45#
46#	Define targets
47#
48ALL_TARGET	= $(BINARY) $(CONFMOD)
49LINT_TARGET	= $(MODULE).lint
50INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
51
52C99MODE=        -xc99=%all
53C99LMODE=       -Xc99=%all
54
55#
56# 	Driver-specific flags
57#	XXX inline bits were originally set to inline
58#
59CPPFLAGS	+= -DLM_RXPKT_NON_CONTIGUOUS \
60		   -DELINK_ENHANCEMENTS \
61		   -DELINK_57711E_SUPPORT \
62		   -DELINK_DEBUG \
63		   -D__inline= \
64		   -D_inline= \
65		   -D__BASENAME__=\"bnxe\" \
66		   -D__SunOS \
67		   -D__S11 \
68		   -DILLUMOS \
69		   -DBIG_ENDIAN \
70		   -DBIG_ENDIAN_HOST \
71		   -D__BIG_ENDIAN \
72		   -I$(SRCDIR)/577xx/include \
73		   -I$(SRCDIR)/577xx/drivers/common/ecore \
74		   -I$(SRCDIR)/577xx/drivers/common/include \
75		   -I$(SRCDIR)/577xx/drivers/common/include/l4 \
76		   -I$(SRCDIR)/577xx/drivers/common/include/l5 \
77		   -I$(SRCDIR)/577xx/drivers/common/lm/device \
78		   -I$(SRCDIR)/577xx/drivers/common/lm/fw \
79		   -I$(SRCDIR)/577xx/drivers/common/lm/include \
80		   -I$(SRCDIR)/577xx/drivers/common/lm/l4 \
81		   -I$(SRCDIR)/577xx/drivers/common/lm/l4/include \
82		   -I$(SRCDIR)/577xx/drivers/common/lm/l5 \
83		   -I$(SRCDIR)/577xx/drivers/common/lm/l5/include \
84		   -I$(SRCDIR)/577xx/hsi/hw/include \
85		   -I$(SRCDIR)/577xx/hsi/mcp \
86		   -I$(SRCDIR)
87
88LDFLAGS		+= -dy -r -Ndrv/ip -Nmisc/mac
89#CERRWARN	+= -_gcc=-Wno-old-style-declaration
90CERRWARN	+= -_gcc=-Wno-switch
91CERRWARN	+= -_gcc=-Wno-uninitialized
92CERRWARN	+= -_gcc=-Wno-parentheses
93CERRWARN	+= -_gcc=-Wno-unused-function
94CERRWARN	+= -_gcc=-Wno-unused-value
95CERRWARN	+= -_gcc=-Wno-unused-variable
96CERRWARN	+= -_cc=-erroff=E_STATEMENT_NOT_REACHED
97CERRWARN	+= -_cc=-erroff=E_ARGUEMENT_MISMATCH
98CERRWARN	+= -_cc=-erroff=E_INTEGER_OVERFLOW_DETECTED
99CERRWARN	+= -_cc=-erroff=E_CONST_PROMOTED_UNSIGNED_LL
100CERRWARN	+= -_cc=-erroff=E_ENUM_VAL_OVERFLOWS_INT_MAX
101
102LINTTAGS	+= -erroff=E_FUNC_RET_ALWAYS_IGNOR2
103LINTTAGS	+= -erroff=E_FUNC_RET_MAYBE_IGNORED2
104LINTTAGS	+= -erroff=E_STATIC_UNUSED
105LINTTAGS	+= -erroff=E_FUNC_SET_NOT_USED
106LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
107LINTTAGS	+= -erroff=E_CONSTANT_CONDITION
108LINTTAGS	+= -erroff=E_NOP_ELSE_STMT
109LINTTAGS	+= -erroff=E_NOP_IF_STMT
110LINTTAGS	+= -erroff=E_FUNC_ARG_UNUSED
111LINTTAGS	+= -erroff=E_FUNC_VAR_UNUSED
112LINTTAGS	+= -erroff=E_EXPR_NULL_EFFECT
113LINTTAGS	+= -erroff=E_STMT_NOT_REACHED
114LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
115LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
116LINTTAGS	+= -erroff=E_CASE_FALLTHRU
117LINTTAGS	+= -erroff=E_CONST_EXPR
118
119#
120#	Default build targets.
121#
122.KEEP_STATE:
123
124def:		$(DEF_DEPS)
125
126all:		$(ALL_DEPS)
127
128clean:		$(CLEAN_DEPS)
129
130clobber:	$(CLOBBER_DEPS)
131
132lint:		$(LINT_DEPS)
133
134modlintlib:	$(MODLINTLIB_DEPS)
135
136clean.lint:	$(CLEAN_LINT_DEPS)
137
138install:	$(INSTALL_DEPS)
139
140#
141#	Include common targets.
142#
143include $(UTSBASE)/sparc/Makefile.targ
144