drm/linux-core/Makefile.kernel

90 lines
3.0 KiB
Makefile
Raw Normal View History

1999-12-05 16:10:37 -07:00
#
# Makefile for the drm device driver. This driver provides support for
# the Direct Rendering Infrastructure (DRI) in XFree86 4.x.
#
2000-08-04 04:04:55 -06:00
# drm.o is a fake target -- it is never built
# The real targets are in the module-list
O_TARGET := drm.o
module-list := gamma.o tdfx.o r128.o ffb.o mga.o i810.o
export-objs := $(patsubst %.o,%_drv.o,$(module-list))
1999-12-05 16:10:37 -07:00
2000-08-04 04:04:55 -06:00
# libs-objs are included in every module so that radical changes to the
# architecture of the DRM support library can be made at a later time.
#
# The downside is that each module is larger, and a system that uses
# more than one module (i.e., a dual-head system) will use more memory
# (but a system that uses exactly one module will use the same amount of
# memory).
#
# The upside is that if the DRM support library ever becomes insufficient
# for new families of cards, a new library can be implemented for those new
# cards without impacting the drivers for the old cards. This is significant,
# because testing architectural changes to old cards may be impossible, and
# may delay the implementation of a better architecture. We've traded slight
# memory waste (in the dual-head case) for greatly improved long-term
# maintainability.
#
lib-objs := init.o memory.o proc.o auth.o context.o drawable.o bufs.o
lib-objs += lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o
2000-02-22 08:43:59 -07:00
2000-08-04 04:04:55 -06:00
ifeq ($(CONFIG_AGP),y)
lib-objs += agpsupport.o
2000-08-04 04:04:55 -06:00
else
ifeq ($(CONFIG_AGP),m)
lib-objs += agpsupport.o
endif
endif
2000-04-04 16:08:14 -06:00
gamma-objs := $(lib-objs) gamma_drv.o gamma_dma.o
tdfx-objs := $(lib-objs) tdfx_drv.o tdfx_context.o
2000-12-01 23:14:18 -07:00
r128-objs := $(lib-objs) r128_drv.o r128_cce.o r128_context.o r128_bufs.o\
r128_state.o
ffb-objs := $(lib-objs) ffb_drv.o ffb_context.o
mga-objs := $(lib-objs) mga_drv.o mga_dma.o mga_context.o mga_bufs.o \
mga_state.o
i810-objs := $(lib-objs) i810_drv.o i810_dma.o i810_context.o i810_bufs.o
obj-$(CONFIG_DRM_GAMMA) += gamma.o $(gamma-objs)
obj-$(CONFIG_DRM_TDFX) += tdfx.o $(tdfx-objs)
obj-$(CONFIG_DRM_R128) += r128.o $(r128-objs)
obj-$(CONFIG_DRM_FFB) += ffb.o $(ffb-objs)
ifneq ($CONFIG_AGP),)
2000-07-21 19:08:00 -06:00
obj-$(CONFIG_DRM_MGA) += mga.o $(mga-objs)
obj-$(CONFIG_DRM_I810) += i810.o $(i810-objs)
endif
2000-04-04 16:08:14 -06:00
# Take module names out of obj-y and int-m
2000-07-19 12:38:41 -06:00
obj-y := $(filter-out $(module-list), $(obj-y))
int-m := $(filter-out $(module-list), $(obj-m))
# Translate to Rules.make lists.
2000-07-19 12:38:41 -06:00
O_OBJS := $(filter-out $(export-objs), $(obj-y))
OX_OBJS := $(filter $(export-objs), $(obj-y))
M_OBJS := $(sort $(filter $(module-list), $(obj-m)))
MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
2000-07-19 12:38:41 -06:00
1999-12-05 16:10:37 -07:00
include $(TOPDIR)/Rules.make
gamma.o: $(gamma-objs)
2000-08-04 04:04:55 -06:00
$(LD) -r -o $@ $(gamma-objs)
2000-02-22 08:43:59 -07:00
tdfx.o: $(tdfx-objs)
2000-08-04 04:04:55 -06:00
$(LD) -r -o $@ $(tdfx-objs)
2000-04-04 16:08:14 -06:00
mga.o: $(mga-objs)
2000-08-04 04:04:55 -06:00
$(LD) -r -o $@ $(mga-objs)
2000-04-04 16:08:14 -06:00
i810.o: $(i810-objs)
2000-08-04 04:04:55 -06:00
$(LD) -r -o $@ $(i810-objs)
2000-04-04 16:08:14 -06:00
r128.o: $(r128-objs)
2000-08-04 04:04:55 -06:00
$(LD) -r -o $@ $(r128-objs)
2000-07-19 12:38:41 -06:00
ffb.o: $(ffb-objs)
2000-08-04 04:04:55 -06:00
$(LD) -r -o $@ $(ffb-objs)