1 # src/gallium/targets/gbm/Makefile
4 include $(TOP
)/configs
/current
8 GBM_BACKEND
= gbm_gallium_drm
9 GBM_SOURCES
= gbm.c pipe_loader.c
13 -I
$(TOP
)/src
/gallium
/state_trackers
/gbm \
14 -I
$(TOP
)/src
/gbm
/main \
15 -I
$(TOP
)/src
/gallium
/auxiliary \
16 -I
$(TOP
)/src
/gallium
/include \
18 GBM_LIBS
= $(LIBUDEV_LIBS
) $(LIBDRM_LIB
) \
19 $(TOP
)/src
/gallium
/state_trackers
/gbm
/libgbm.a \
20 $(TOP
)/src
/gallium
/drivers
/identity
/libidentity.a \
21 $(TOP
)/src
/gallium
/drivers
/galahad
/libgalahad.a \
22 $(TOP
)/src
/gallium
/drivers
/trace
/libtrace.a \
23 $(TOP
)/src
/gallium
/drivers
/rbug
/librbug.a \
24 $(GALLIUM_AUXILIARIES
)
28 -DGBM_BACKEND_SEARCH_DIR
=\"$(GBM_BACKEND_INSTALL_DIR
)\" \
29 -DPIPE_PREFIX
=\"$(PIPE_PREFIX
)\" \
36 -I
$(TOP
)/src
/gallium
/auxiliary \
37 -I
$(TOP
)/src
/gallium
/drivers \
38 -I
$(TOP
)/src
/gallium
/include \
39 -I
$(TOP
)/src
/gallium
/winsys
42 $(TOP
)/src
/gallium
/drivers
/identity
/libidentity.a \
43 $(TOP
)/src
/gallium
/drivers
/trace
/libtrace.a \
44 $(TOP
)/src
/gallium
/drivers
/rbug
/librbug.a \
45 $(GALLIUM_AUXILIARIES
)
47 # as if we are DRI modules
48 pipe_SYS
= $(DRI_LIB_DEPS
)
51 -DGALLIUM_RBUG
-DGALLIUM_TRACE
-DGALLIUM_GALAHAD \
54 pipe_LDFLAGS
= -Wl
,--no-undefined
58 $(TOP
)/src
/gallium
/winsys
/i915
/drm
/libi915drm.a \
59 $(TOP
)/src
/gallium
/drivers
/i915
/libi915.a
60 i915_SYS
= -ldrm_intel
64 $(TOP
)/src
/gallium
/winsys
/i965
/drm
/libi965drm.a \
65 $(TOP
)/src
/gallium
/drivers
/i965
/libi965.a \
66 $(TOP
)/src
/gallium
/winsys
/sw
/wrapper
/libwsw.a
67 i965_SYS
= -ldrm_intel
71 $(TOP
)/src
/gallium
/winsys
/nouveau
/drm
/libnouveaudrm.a \
72 $(TOP
)/src
/gallium
/drivers
/nvfx
/libnvfx.a \
73 $(TOP
)/src
/gallium
/drivers
/nv50
/libnv50.a \
74 $(TOP
)/src
/gallium
/drivers
/nvc0
/libnvc0.a \
75 $(TOP
)/src
/gallium
/drivers
/nouveau
/libnouveau.a
76 nouveau_SYS
= -ldrm_nouveau
80 $(TOP
)/src
/gallium
/winsys
/radeon
/drm
/libradeonwinsys.a \
81 $(TOP
)/src
/gallium
/drivers
/r300
/libr300.a
82 r300_SYS
= -ldrm_radeon
86 $(TOP
)/src
/gallium
/winsys
/r600
/drm
/libr600winsys.a \
87 $(TOP
)/src
/gallium
/drivers
/r600
/libr600.a
88 r600_SYS
= -ldrm_radeon
92 $(TOP
)/src
/gallium
/winsys
/svga
/drm
/libsvgadrm.a \
93 $(TOP
)/src
/gallium
/drivers
/svga
/libsvga.a
97 pipe_LIBS
+= $(TOP
)/src
/gallium
/drivers
/llvmpipe
/libllvmpipe.a
98 pipe_SYS
+= $(LLVM_LIBS
)
99 pipe_LDFLAGS
+= $(LLVM_LDFLAGS
)
102 # determine the targets/sources
106 ifneq ($(findstring i915
/drm
,$(GALLIUM_WINSYS_DIRS
)),)
107 pipe_TARGETS
+= $(PIPE_PREFIX
)i915.so
108 pipe_SOURCES
+= pipe_i915.c
111 ifneq ($(findstring i965
/drm
,$(GALLIUM_WINSYS_DIRS
)),)
112 pipe_TARGETS
+= $(PIPE_PREFIX
)i965.so
113 pipe_SOURCES
+= pipe_i965.c
116 ifneq ($(findstring nouveau
/drm
,$(GALLIUM_WINSYS_DIRS
)),)
117 pipe_TARGETS
+= $(PIPE_PREFIX
)nouveau.so
118 pipe_SOURCES
+= pipe_nouveau.c
121 ifneq ($(findstring radeon
/drm
,$(GALLIUM_WINSYS_DIRS
)),)
122 pipe_TARGETS
+= $(PIPE_PREFIX
)r300.so
123 pipe_SOURCES
+= pipe_r300.c
126 ifneq ($(findstring r600
/drm
,$(GALLIUM_WINSYS_DIRS
)),)
127 pipe_TARGETS
+= $(PIPE_PREFIX
)r600.so
128 pipe_SOURCES
+= pipe_r600.c
131 ifneq ($(findstring svga
/drm
,$(GALLIUM_WINSYS_DIRS
)),)
132 pipe_TARGETS
+= $(PIPE_PREFIX
)vmwgfx.so
133 pipe_SOURCES
+= pipe_vmwgfx.c
136 pipe_OBJECTS
= $(pipe_SOURCES
:.c
=.o
)
139 GBM_EXTRA_TARGETS
= $(addprefix $(TOP
)/$(LIB_DIR
)/gbm
/, $(pipe_TARGETS
))
140 GBM_EXTRA_INSTALL
= install-pipes
141 GBM_EXTRA_CLEAN
= clean-pipes
142 GBM_EXTRA_SOURCES
= $(pipe_SOURCES
)
144 include $(TOP
)/src
/gbm
/backends
/Makefile.template
147 $(GBM_EXTRA_TARGETS
): $(TOP
)/$(LIB_DIR
)/gbm
/%: %
148 @
$(INSTALL
) -d
$(dir $@
)
149 $(INSTALL
) $< $(dir $@
)
151 $(pipe_TARGETS
): $(PIPE_PREFIX
)%.so
: pipe_
%.o
152 $(MKLIB
) -o
$@
-noprefix
-linker
'$(CC)' \
153 -ldflags '-L$(TOP)/$(LIB_DIR) $(pipe_LDFLAGS) $(LDFLAGS)' \
154 $(MKLIB_OPTIONS
) $< \
155 -Wl
,--start-group
$(pipe_LIBS
) $($*_LIBS
) -Wl
,--end-group \
156 $(pipe_SYS
) $($*_SYS
)
158 $(pipe_OBJECTS
): %.o
: %.c
159 $(CC
) -c
-o
$@
$< $(pipe_INCLUDES
) $(pipe_CFLAGS
) $(CFLAGS
)
161 install-pipes
: $(GBM_EXTRA_TARGETS
)
162 $(INSTALL
) -d
$(DESTDIR
)$(GBM_BACKEND_INSTALL_DIR
)
163 for tgt in
$(GBM_EXTRA_TARGETS
); do \
164 $(MINSTALL
) "$$tgt" $(DESTDIR
)$(GBM_BACKEND_INSTALL_DIR
); \
168 rm -f
$(pipe_TARGETS
)
169 rm -f
$(pipe_OBJECTS
)