summaryrefslogtreecommitdiff
path: root/linux-core/Makefile
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-01-07 22:37:40 -0800
committerKeith Packard <keithp@neko.keithp.com>2007-01-07 22:37:40 -0800
commitc5aaf7648df82665851c9e67f5509b427ca34c8e (patch)
tree55b317738a99097cb02ba6a736b9ef20de6b34f3 /linux-core/Makefile
parent63c0f3946056d044b7c5688fa5cb670782212c77 (diff)
parentd0080d71b9f3df0d4f743324b7e8f1ce580bdcaf (diff)
Merge branch 'master' into crestline
Conflicts: shared-core/i915_drm.h Whitespace change only
Diffstat (limited to 'linux-core/Makefile')
-rw-r--r--linux-core/Makefile77
1 files changed, 12 insertions, 65 deletions
diff --git a/linux-core/Makefile b/linux-core/Makefile
index 3aecec43..590633b3 100644
--- a/linux-core/Makefile
+++ b/linux-core/Makefile
@@ -58,7 +58,7 @@ endif
# Modules for all architectures
MODULE_LIST := drm.o tdfx.o r128.o radeon.o mga.o sis.o savage.o via.o \
- mach64.o nv.o
+ mach64.o nv.o nouveau.o
# Modules only for ix86 architectures
ifneq (,$(findstring 86,$(MACHINE)))
@@ -75,45 +75,27 @@ DRM_MODULES ?= $(MODULE_LIST)
# These definitions are for handling dependencies in the out of kernel build.
-DRMSHARED = drm.h drm_sarea.h drm_drawable.c
DRMHEADERS = drmP.h drm_compat.h drm_os_linux.h drm.h drm_sarea.h
COREHEADERS = drm_core.h drm_sman.h drm_hashtab.h
TDFXHEADERS = tdfx_drv.h $(DRMHEADERS)
-TDFXSHARED = tdfx_drv.h
R128HEADERS = r128_drv.h r128_drm.h $(DRMHEADERS)
-R128SHARED = r128_drv.h r128_drm.h r128_cce.c r128_state.c r128_irq.c
RADEONHEADERS = radeon_drv.h radeon_drm.h r300_reg.h $(DRMHEADERS)
-RADEONSHARED = radeon_drv.h radeon_drm.h radeon_cp.c radeon_irq.c \
- radeon_mem.c radeon_state.c r300_cmdbuf.c r300_reg.h
MGAHEADERS = mga_drv.h mga_drm.h mga_ucode.h $(DRMHEADERS)
-MGASHARED = mga_dma.c mga_drm.h mga_drv.h mga_irq.c mga_state.c \
- mga_ucode.h mga_warp.c
I810HEADERS = i810_drv.h i810_drm.h $(DRMHEADERS)
I830HEADERS = i830_drv.h i830_drm.h $(DRMHEADERS)
I915HEADERS = i915_drv.h i915_drm.h $(DRMHEADERS)
-I915SHARED = i915_drv.h i915_drm.h i915_irq.c i915_mem.c i915_dma.c
SISHEADERS= sis_drv.h sis_drm.h drm_hashtab.h drm_sman.h $(DRMHEADERS)
-SISSHARED= sis_drv.h sis_drm.h
SAVAGEHEADERS= savage_drv.h savage_drm.h $(DRMHEADERS)
-SAVAGESHARED= savage_drv.h savage_drm.h savage_bci.c savage_state.c
VIAHEADERS = via_drm.h via_drv.h via_3d_reg.h via_verifier.h $(DRMHEADERS)
-VIASHARED = via_drm.h via_drv.h via_3d_reg.h via_drv.c via_irq.c via_map.c \
- via_dma.c via_verifier.c via_verifier.h via_video.c
MACH64HEADERS = mach64_drv.h mach64_drm.h $(DRMHEADERS)
-MACH64SHARED = mach64_drv.h mach64_drm.h mach64_dma.c \
- mach64_irq.c mach64_state.c
NVHEADERS = nv_drv.h $(DRMHEADERS)
-NVSHARED = nv_drv.h
FFBHEADERS = ffb_drv.h $(DRMHEADERS)
-
-SHAREDSRC = $(DRMSHARED) $(MGASHARED) $(R128SHARED) $(RADEONSHARED) \
- $(SISSHARED) $(TDFXSHARED) $(VIASHARED) $(MACH64SHARED) \
- $(I915SHARED) $(SAVAGESHARED) $(NVSHARED)
+NOUVEAUHEADERS = nouveau_drv.h nouveau_drm.h nouveau_reg.h $(DRMHEADERS)
PROGS = dristat drmstat
-CLEANFILES = *.o *.ko $(PROGS) .depend .*.flags .*.d .*.cmd *.mod.c linux drm_pciids.h .tmp_versions
+CLEANFILES = *.o *.ko $(PROGS) .depend .*.flags .*.d .*.cmd *.mod.c drm_pciids.h .tmp_versions
# VERSION is not defined from the initial invocation. It is defined when
# this Makefile is invoked from the kernel's root Makefile.
@@ -226,27 +208,13 @@ endif
SHAREDDIR := ../shared-core
-HASSHARED := $(shell if [ -d $(SHAREDDIR) ]; then echo y; fi)
-
-ifeq ($(HASSHARED),y)
-includes:: $(SHAREDSRC) drm_pciids.h
+ifeq ($(shell if [ -d $(SHAREDDIR) ]; then echo y; fi),y)
+includes:: drm_pciids.h
drm_pciids.h: $(SHAREDDIR)/drm_pciids.txt
sh ../scripts/create_linux_pci_lists.sh < $(SHAREDDIR)/drm_pciids.txt
-
-$(SHAREDSRC):
- @if [ -r $(SHAREDDIR)/$@ ]; then \
- (rm -f $@; set -x; ln -s $(SHAREDDIR)/$@ $@); fi
-
-CLEANFILES += $(SHAREDSRC)
endif
-includes:: linux
-
-linux:
- rm -f linux
- ln -s . linux
-
clean cleandir:
rm -rf $(CLEANFILES)
@@ -274,11 +242,11 @@ else
# Check for kernel versions that we don't support.
-BELOW24 := $(shell if [ $(VERSION) -lt 2 -o $(PATCHLEVEL) -lt 4 ]; then \
+BELOW26 := $(shell if [ $(VERSION) -lt 2 -o $(PATCHLEVEL) -lt 6 ]; then \
echo y; fi)
-ifeq ($(BELOW24),y)
-$(error Only 2.4.x and later kernels are supported \
+ifeq ($(BELOW26),y)
+$(error Only 2.6.x and later kernels are supported \
($(VERSION).$(PATCHLEVEL).$(SUBLEVEL)))
endif
@@ -291,30 +259,6 @@ endif
# This needs to go before all other include paths.
CC += -I$(DRMSRCDIR)
-# Check for Red Hat's 4-argument do_munmap().
-DOMUNMAP := $(shell grep do_munmap $(LINUXDIR)/include/linux/mm.h | \
- grep -c acct)
-
-ifneq ($(DOMUNMAP),0)
-EXTRA_CFLAGS += -DDO_MUNMAP_4_ARGS
-endif
-
-# Check for 5-argument remap_page_range() in RH9 kernel, and 2.5.x kernels
-RPR := $(shell grep remap_page_range $(LINUXDIR)/include/linux/mm.h | \
- grep -c vma)
-
-ifneq ($(RPR),0)
-EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_5_ARGS
-endif
-
-# Check for 4-argument vmap() in some 2.5.x and 2.4.x kernels
-VMAP := $(shell grep -A1 'vmap.*count,$$' $(LINUXDIR)/include/linux/vmalloc.h | \
- grep -c prot)
-
-ifneq ($(VMAP),0)
-EXTRA_CFLAGS += -DVMAP_4_ARGS
-endif
-
# Check for PAGE_AGP definition
PAGE_AGP := $(shell cat $(LINUXDIR)/include/asm/agp.h 2>/dev/null | \
grep -c PAGE_AGP)
@@ -323,7 +267,6 @@ ifneq ($(PAGE_AGP),0)
EXTRA_CFLAGS += -DHAVE_PAGE_AGP
endif
-
# Start with all modules turned off.
CONFIG_DRM_GAMMA := n
CONFIG_DRM_TDFX := n
@@ -372,6 +315,9 @@ endif
ifneq (,$(findstring nv,$(DRM_MODULES)))
CONFIG_DRM_NV := m
endif
+ifneq (,$(findstring nouveau,$(DRM_MODULES)))
+CONFIG_DRM_NOUVEAU := m
+endif
# These require AGP support
@@ -402,6 +348,7 @@ $(savage-objs): $(SAVAGEHEADERS)
$(via-objs): $(VIAHEADERS)
$(mach64-objs): $(MACH64HEADERS)
$(nv-objs): $(NVHEADERS)
+$(nouveau-objs): $(NOUVEAUHEADERS)
endif