summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/Makefile.vdpau
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/Makefile.vdpau')
-rw-r--r--src/gallium/targets/Makefile.vdpau9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/targets/Makefile.vdpau b/src/gallium/targets/Makefile.vdpau
index c63491502c0..39984e28d9d 100644
--- a/src/gallium/targets/Makefile.vdpau
+++ b/src/gallium/targets/Makefile.vdpau
@@ -17,8 +17,13 @@ STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/vdpau/libvdpautracker.a
ifeq ($(MESA_LLVM),1)
LDFLAGS += $(LLVM_LDFLAGS)
DRIVER_EXTRAS = $(LLVM_LIBS)
+LD=$(CXX)
else
-LDFLAGS += -lstdc++
+ ifeq ($(LINK_WITH_CXX),1)
+ LD=$(CXX)
+ else
+ LD=$(CC)
+ endif
endif
# XXX: Hack, VDPAU public funcs aren't exported if we link to libvdpautracker.a :(
@@ -39,7 +44,7 @@ OBJECTS = $(C_SOURCES:.c=.o) \
default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile
- $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(LIBBASENAME) -linker '$(LD)' -ldflags '$(LDFLAGS)' \
-major $(VDPAU_MAJOR) -minor $(VDPAU_MINOR) $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR)/gallium \
$(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS)