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
10 module-list
:= gamma.o tdfx.o r128.o ffb.o mga.o i810.o
11 export-objs
:= $(patsubst %.o
,%_drv.o
,$(module-list
))
13 # libs-objs are included in every module so that radical changes to the
14 # architecture of the DRM support library can be made at a later time.
16 # The downside is that each module is larger, and a system that uses
17 # more than one module (i.e., a dual-head system) will use more memory
18 # (but a system that uses exactly one module will use the same amount of
21 # The upside is that if the DRM support library ever becomes insufficient
22 # for new families of cards, a new library can be implemented for those new
23 # cards without impacting the drivers for the old cards. This is significant,
24 # because testing architectural changes to old cards may be impossible, and
25 # may delay the implementation of a better architecture. We've traded slight
26 # memory waste (in the dual-head case) for greatly improved long-term
29 lib-objs
:= init.o memory.o proc.o auth.o context.o drawable.o bufs.o
30 lib-objs
+= lists.o lock.o ioctl.o fops.o vm.o dma.o ctxbitmap.o
32 ifeq ($(CONFIG_AGP
),y
)
33 lib-objs
+= agpsupport.o
35 ifeq ($(CONFIG_AGP
),m
)
36 lib-objs
+= agpsupport.o
40 gamma-objs
:= gamma_drv.o gamma_dma.o
41 tdfx-objs
:= tdfx_drv.o tdfx_context.o
42 r128-objs
:= r128_drv.o r128_dma.o r128_context.o r128_bufs.o
43 ffb-objs
:= ffb_drv.o ffb_context.o
44 mga-objs
:= mga_drv.o mga_dma.o mga_context.o mga_bufs.o mga_state.o
45 i810-objs
:= i810_drv.o i810_dma.o i810_context.o i810_bufs.o
47 obj-
$(CONFIG_DRM_GAMMA
) += gamma.o
48 obj-
$(CONFIG_DRM_TDFX
) += tdfx.o
49 obj-
$(CONFIG_DRM_R128
) += r128.o
50 obj-
$(CONFIG_DRM_FFB
) += ffb.o
51 obj-
$(CONFIG_DRM_MGA
) += mga.o
52 obj-
$(CONFIG_DRM_I810
) += i810.o
55 # When linking into the kernel, link the library just once.
56 # If making modules, we include the library into each module
64 include $(TOPDIR
)/Rules.make
68 $(AR
) $(EXTRA_ARFLAGS
) rcs
$@
$(lib-objs
)
70 gamma.o
: $(gamma-objs
) $(lib
)
71 $(LD
) -r
-o
$@
$(gamma-objs
) $(lib
)
73 tdfx.o
: $(tdfx-objs
) $(lib
)
74 $(LD
) -r
-o
$@
$(tdfx-objs
) $(lib
)
76 mga.o
: $(mga-objs
) $(lib
)
77 $(LD
) -r
-o
$@
$(mga-objs
) $(lib
)
79 i810.o
: $(i810-objs
) $(lib
)
80 $(LD
) -r
-o
$@
$(i810-objs
) $(lib
)
82 r128.o
: $(r128-objs
) $(lib
)
83 $(LD
) -r
-o
$@
$(r128-objs
) $(lib
)
85 ffb.o
: $(ffb-objs
) $(lib
)
86 $(LD
) -r
-o
$@
$(ffb-objs
) $(lib
)