#
# This Makefile was automatically generated; do not edit.
# Generated on 'swio-display-x64-rhel04-11' on Sat Nov 7 20:27:37 PST 2015.
#

#
# KBUILD Makefile for the NVIDIA Linux kernel module.
#
# The motivation for replacing the original Makefile is the hope that this
# version will simplify the build and installation process. In the past,
# many architectural and cosmetic changes to the Linux kernel have made it
# difficult to maintain compatibility or required duplication of logic.
#
# Linux 2.6 introduces numerous such changes, many of which impact modules.
# Relying on KBUILD, some aspects of the build system otherwise difficult
# to support (for example, module versioning) are abstracted away and dealt
# with elsewhere, making life significantly easier here.
#
# The new approach currently has its own share of problems, some of which
# are architectural difficulties with KBUILD, others minor annoyances. For
# this reason, an improved version of the NVIDIA Makefile is available to
# those experiencing difficulties.
#
# kbuild Makefile originally developed by:
#
# Alistair J Strachan (alistair@devzero.co.uk) (first pass, enhancements)
# Christian Zander (zander@mail.minion.de) (enhancements)
#

#
# The NVIDIA kernel module base name. The names of additional kernel modules
# will be variants on this name.
#

MODULE_NAME := nvidia

VERSION_HEADER := nv_compiler.h

#
# List of object files to link into NVIDIA kernel module
#
# Make sure KBUILD understands that we want a module.
#

CORE_OBJS := nv-kernel.o

FUNCTION_COMPILE_TESTS = \
	remap_pfn_range \
	follow_pfn \
	vmap \
	set_pages_uc \
	set_memory_uc \
	set_memory_array_uc \
	change_page_attr \
	pci_get_class \
	pci_choose_state \
	vm_insert_page \
	acpi_device_id \
	acquire_console_sem \
	console_lock \
	kmem_cache_create \
	on_each_cpu \
	smp_call_function \
	acpi_evaluate_integer \
	ioremap_cache \
	ioremap_wc \
	acpi_walk_namespace \
	pci_domain_nr \
	pci_dma_mapping_error \
	sg_alloc_table \
	pci_get_domain_bus_and_slot \
	get_num_physpages \
	efi_enabled \
	proc_create_data \
	pde_data \
	proc_remove \
	pm_vt_switch_required \
	drm_pci_set_busid \
	xen_ioemu_inject_msi \
	phys_to_dma \
	get_dma_ops \
	write_cr4 \
	for_each_online_node \
	node_end_pfn

TYPE_COMPILE_TESTS = \
	i2c_adapter \
	pm_message_t \
	irq_handler_t \
	acpi_device_ops \
	acpi_op_remove \
	acpi_device_id \
	outer_flush_all \
	proc_dir_entry \
	scatterlist \
	sg_table \
	file_operations \
	vm_operations_struct \
	pci_save_state \
	file_inode \
	task_struct \
	kuid_t \
	dma_ops \
	dma_map_ops \
	noncoherent_swiotlb_dma_ops

GENERIC_COMPILE_TESTS = \
	dom0_kernel_present \
	drm_available \
	nvidia_grid_build

MACRO_COMPILE_TESTS = \
	INIT_WORK

#
# CFLAGS dependent on the type of builds (e.g. single/muliple module, debug)
#

EXTRA_CFLAGS += -DNV_BUILD_MODULE_INSTANCES=0

EXTRA_CFLAGS += -UDEBUG -U_DEBUG -DNDEBUG

#
# Include common definitions; we rely on the definition of the source path to
# find the file; set to a reasonable default if unset (e.g. for top-level
# passes). The source path is also used in the common file.
#

src ?= .

include $(src)/nvidia-sources.mk
MODULE_GLUE_OBJS := $(patsubst %.c,%.o,$(NVIDIA_SOURCES))

$(MODULE_NAME)-objs := $(CORE_OBJS) $(MODULE_GLUE_OBJS)

include $(src)/nvidia-modules-common.mk

