xref: /illumos-gate/usr/src/uts/intel/bpf/Makefile (revision 82d0151a507442720a3aea34c8925041894ab173)
10a0e9771SDarren Reed#
20a0e9771SDarren Reed# CDDL HEADER START
30a0e9771SDarren Reed#
40a0e9771SDarren Reed# The contents of this file are subject to the terms of the
50a0e9771SDarren Reed# Common Development and Distribution License (the "License").
60a0e9771SDarren Reed# You may not use this file except in compliance with the License.
70a0e9771SDarren Reed#
80a0e9771SDarren Reed# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90a0e9771SDarren Reed# or http://www.opensolaris.org/os/licensing.
100a0e9771SDarren Reed# See the License for the specific language governing permissions
110a0e9771SDarren Reed# and limitations under the License.
120a0e9771SDarren Reed#
130a0e9771SDarren Reed# When distributing Covered Code, include this CDDL HEADER in each
140a0e9771SDarren Reed# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150a0e9771SDarren Reed# If applicable, add the following below this CDDL HEADER, with the
160a0e9771SDarren Reed# fields enclosed by brackets "[]" replaced with your own identifying
170a0e9771SDarren Reed# information: Portions Copyright [yyyy] [name of copyright owner]
180a0e9771SDarren Reed#
190a0e9771SDarren Reed# CDDL HEADER END
200a0e9771SDarren Reed#
210a0e9771SDarren Reed#
220a0e9771SDarren Reed# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230a0e9771SDarren Reed# Use is subject to license terms.
240a0e9771SDarren Reed#
25b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc.
26b6b206fcSJohn Levon#
270a0e9771SDarren Reed# uts/intel/bpf/Makefile
280a0e9771SDarren Reed#
290a0e9771SDarren Reed#
300a0e9771SDarren Reed#	This makefile drives the production of the bpf driver
310a0e9771SDarren Reed#	kernel module.
320a0e9771SDarren Reed#
330a0e9771SDarren Reed#	intel architecture dependent
340a0e9771SDarren Reed#
350a0e9771SDarren Reed
360a0e9771SDarren Reed#
370a0e9771SDarren Reed#	Path to the base of the uts directory tree (usually /usr/src/uts).
380a0e9771SDarren Reed#
390a0e9771SDarren ReedUTSBASE	= ../..
400a0e9771SDarren Reed
410a0e9771SDarren Reed#
420a0e9771SDarren Reed#	Define the module and object file sets.
430a0e9771SDarren Reed#
440a0e9771SDarren ReedMODULE		= bpf
450a0e9771SDarren ReedOBJECTS		= $(BPF_OBJS:%=$(OBJS_DIR)/%)
460a0e9771SDarren ReedROOTMODULE	= $(USR_DRV_DIR)/$(MODULE)
470a0e9771SDarren ReedCONF_SRCDIR	= $(UTSBASE)/common/io/bpf
480a0e9771SDarren Reed
490a0e9771SDarren Reed#
500a0e9771SDarren Reed#	Include common rules.
510a0e9771SDarren Reed#
520a0e9771SDarren Reedinclude $(UTSBASE)/intel/Makefile.intel
530a0e9771SDarren Reed
540a0e9771SDarren Reed#
550a0e9771SDarren Reed#	Define targets
560a0e9771SDarren Reed#
570a0e9771SDarren ReedALL_TARGET	= $(BINARY) $(SRC_CONFFILE)
580a0e9771SDarren ReedINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
590a0e9771SDarren Reed
600a0e9771SDarren Reed#
610a0e9771SDarren Reed#
620a0e9771SDarren ReedCFLAGS		+= $(CCVERBOSE)
63*82d0151aSRichard LoweLDFLAGS		+= -Nmisc/mac -Nmisc/dls -Ndrv/ipnet -Nmisc/neti
640a0e9771SDarren ReedINC_PATH	+= -I$(UTSBASE)/common/io/bpf
650a0e9771SDarren Reed
660a0e9771SDarren Reed#
670aaef2f5SRichard Lowe# For now, disable these warnings; maintainers should endeavor
680aaef2f5SRichard Lowe# to investigate and remove these for maximum coverage.
690a0e9771SDarren Reed# Please do not carry these forward to new Makefiles.
700a0e9771SDarren Reed#
710a0e9771SDarren Reed
727014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
73d3b5f563SJohn LevonCERRWARN	+= $(CNOWARN_UNINIT)
747014882cSRichard Lowe
75b6b206fcSJohn Levon# needs work
76b6b206fcSJohn Levon$(OBJS_DIR)/bpf.o := SMOFF += all_func_returns
77b6b206fcSJohn Levon
780a0e9771SDarren Reed#
790a0e9771SDarren Reed#	Default build targets.
800a0e9771SDarren Reed#
810a0e9771SDarren Reed.KEEP_STATE:
820a0e9771SDarren Reed
830a0e9771SDarren Reeddef:		$(DEF_DEPS)
840a0e9771SDarren Reed
850a0e9771SDarren Reedall:		$(ALL_DEPS)
860a0e9771SDarren Reed
870a0e9771SDarren Reedclean:		$(CLEAN_DEPS)
880a0e9771SDarren Reed
890a0e9771SDarren Reedclobber:	$(CLOBBER_DEPS)
900a0e9771SDarren Reed
910a0e9771SDarren Reedinstall:	$(INSTALL_DEPS)
920a0e9771SDarren Reed
930a0e9771SDarren Reed#
940a0e9771SDarren Reed#	Include common targets.
950a0e9771SDarren Reed#
960a0e9771SDarren Reedinclude $(UTSBASE)/intel/Makefile.targ
97