summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/d3d1x/progs
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-09-27 14:23:33 +0200
committerLuca Barbieri <[email protected]>2010-09-27 14:24:33 +0200
commit31d8f64f3f0befd154b0aa8b234d2c0dd40ab9b6 (patch)
tree56650c5a036f41a23b4f0fd7677d8044e51444de /src/gallium/state_trackers/d3d1x/progs
parent9ba4b30eae1031cdd1f441218eea77de30175104 (diff)
d3d1x: fix progs linking if not all EGL platforms are enabled
Diffstat (limited to 'src/gallium/state_trackers/d3d1x/progs')
-rw-r--r--src/gallium/state_trackers/d3d1x/progs/Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/d3d1x/progs/Makefile b/src/gallium/state_trackers/d3d1x/progs/Makefile
index bb37012a3d7..2f54079a447 100644
--- a/src/gallium/state_trackers/d3d1x/progs/Makefile
+++ b/src/gallium/state_trackers/d3d1x/progs/Makefile
@@ -9,15 +9,29 @@ LIBS= \
../../../winsys/sw/wrapper/libwsw.a \
../../../winsys/sw/xlib/libws_xlib.a \
../../../winsys/sw/dri/libswdri.a \
- ../../../winsys/sw/fbdev/libfbdev.a \
../../../../../lib/libEGL.so
-LIBS_D3D10 = ../dxgid3d10/libdxgid3d10.a ../gd3d10/libgd3d10.a $(LIBS)
-LIBS_D3D11 = ../dxgid3d11/libdxgid3d11.a ../gd3d11/libgd3d11.a $(LIBS)
-LDADD=-lXext -lXfixes -lX11 -ldrm -ldl
+
+LDADD=-ldl
all: bin/d3d10tri bin/d3d11tri bin/d3d11tex bin/d3d11gears
include ../Makefile.inc
+ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),)
+LIBS += ../../../winsys/sw/fbdev/libfbdev.a
+endif
+
+ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
+LDADD += -lX11 -lXext -lXfixes
+LIBS += ../../../winsys/sw/xlib/libws_xlib.a
+endif
+
+ifneq ($(findstring kms, $(EGL_PLATFORMS)),)
+LDADD += -ldrm
+endif
+
+LIBS_D3D10 = ../dxgid3d10/libdxgid3d10.a ../gd3d10/libgd3d10.a $(LIBS)
+LIBS_D3D11 = ../dxgid3d11/libdxgid3d11.a ../gd3d11/libgd3d11.a $(LIBS)
+
bin/d3d10tri: d3d10app/d3d10x11main.o d3d10tri/d3d10tri.o $(LIBS_D3D10)
$(CXX) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS_D3D10) -Wl,--end-group $(LDADD)