2 # Makefile for the drm device driver. This driver provides support for
3 # the Direct Rendering Infrastructure (DRI) in XFree86 4.x.
6 # drm.o is a fake target -- it is never built
7 # The real targets are in the module-list
9 module-list
:= gamma.o tdfx.o r128.o ffb.o mga.o i810.o
10 export-objs
:= $(patsubst %.o
,%_drv.o
,$(module-list
))
12 # libs-objs are included in every module so that radical changes to the
13 # architecture of the DRM support library can be made at a later time.
15 # The downside is that each module is larger, and a system that uses
16 # more than one module (i.e., a dual-head system) will use more memory
17 # (but a system that uses exactly one module will use the same amount of
20 # The upside is that if the DRM support library ever becomes insufficient
21 # for new families of cards, a new library can be implemented for those new
22 # cards without impacting the drivers for the old cards. This is significant,
23 # because testing architectural changes to old cards may be impossible, and
24 # may delay the implementation of a better architecture. We've traded slight
25 # memory waste (in the dual-head case) for greatly improved long-term
28 lib-objs
:= init.o memory.o proc.o auth.o context.o drawable.o bufs.o
29 lib-objs
+= lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o
31 ifeq ($(CONFIG_AGP
),y
)
32 lib-objs
+= agpsupport.o
34 ifeq ($(CONFIG_AGP
),m
)
35 lib-objs
+= agpsupport.o
39 gamma-objs
:= $(lib-objs
) gamma_drv.o gamma_dma.o
40 tdfx-objs
:= $(lib-objs
) tdfx_drv.o tdfx_context.o
41 r128-objs
:= $(lib-objs
) r128_drv.o r128_dma.o r128_context.o r128_bufs.o
42 ffb-objs
:= $(lib-objs
) ffb_drv.o ffb_context.o
43 mga-objs
:= $(lib-objs
) mga_drv.o mga_dma.o mga_context.o mga_bufs.o \
45 i810-objs
:= $(lib-objs
) i810_drv.o i810_dma.o i810_context.o i810_bufs.o
47 obj-
$(CONFIG_DRM_GAMMA
) += gamma.o
$(gamma-objs
)
48 obj-
$(CONFIG_DRM_TDFX
) += tdfx.o
$(tdfx-objs
)
49 obj-
$(CONFIG_DRM_R128
) += r128.o
$(r128-objs
)
50 obj-
$(CONFIG_DRM_FFB
) += ffb.o
$(ffb-objs
)
53 obj-
$(CONFIG_DRM_MGA
) += mga.o
$(mga-objs
)
54 obj-
$(CONFIG_DRM_I810
) += i810.o
$(i810-objs
)
57 # Take module names out of obj-y and int-m
59 obj-y
:= $(filter-out $(module-list
), $(obj-y
))
60 int-m
:= $(filter-out $(module-list
), $(obj-m
))
62 # Translate to Rules.make lists.
64 O_OBJS
:= $(filter-out $(export-objs
), $(obj-y
))
65 OX_OBJS
:= $(filter $(export-objs
), $(obj-y
))
66 M_OBJS
:= $(sort $(filter $(module-list
), $(obj-m
)))
67 MI_OBJS
:= $(sort $(filter-out $(export-objs
), $(int-m
)))
68 MIX_OBJS
:= $(sort $(filter $(export-objs
), $(int-m
)))
70 include $(TOPDIR
)/Rules.make
72 gamma.o
: $(gamma-objs
)
73 $(LD
) -r
-o
$@
$(gamma-objs
)
76 $(LD
) -r
-o
$@
$(tdfx-objs
)
79 $(LD
) -r
-o
$@
$(mga-objs
)
82 $(LD
) -r
-o
$@
$(i810-objs
)
85 $(LD
) -r
-o
$@
$(r128-objs
)
88 $(LD
) -r
-o
$@
$(ffb-objs
)