diff options
author | Marek Olšák <[email protected]> | 2011-07-15 03:24:40 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-07-15 10:31:07 +0200 |
commit | a2381665d5b65ba04f168afecd40574684bf4df3 (patch) | |
tree | e16b202de0f74d3bb31e4cb07619c2ef62b12971 /src/gallium/targets | |
parent | 13da00f07c35d78b7ba8bc5d30e8c4b0b001744c (diff) |
gallium/targets: link vdpau, va, and xvmc with LLVM libs when requested
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/Makefile.va | 9 | ||||
-rw-r--r-- | src/gallium/targets/Makefile.vdpau | 9 | ||||
-rw-r--r-- | src/gallium/targets/Makefile.xvmc | 10 |
3 files changed, 25 insertions, 3 deletions
diff --git a/src/gallium/targets/Makefile.va b/src/gallium/targets/Makefile.va index efb0a59522a..7ced430f690 100644 --- a/src/gallium/targets/Makefile.va +++ b/src/gallium/targets/Makefile.va @@ -14,6 +14,13 @@ DEFINES = -DGALLIUM_TRACE -DVER_MAJOR=$(VA_MAJOR) -DVER_MINOR=$(VA_MINOR) $(DRIV LIBS = $(EXTRA_LIB_PATH) $(DRIVER_LIBS) -lva -lXext -lX11 -lm STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/va/libvatracker.a +ifeq ($(MESA_LLVM),1) +LDFLAGS += $(LLVM_LDFLAGS) +DRIVER_EXTRAS = $(LLVM_LIBS) +else +LDFLAGS += -lstdc++ +endif + # XXX: Hack, VA public funcs aren't exported OBJECTS = $(C_SOURCES:.c=.o) \ $(ASM_SOURCES:.S=.o) \ @@ -35,7 +42,7 @@ $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ -major $(VA_MAJOR) -minor $(VA_MINOR) $(MKLIB_OPTIONS) \ -install $(TOP)/$(LIB_DIR)/gallium \ - $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) + $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS) $(TOP)/$(LIB_DIR)/gallium: mkdir -p $@ diff --git a/src/gallium/targets/Makefile.vdpau b/src/gallium/targets/Makefile.vdpau index 6b8443fe35c..c0937ff1aa5 100644 --- a/src/gallium/targets/Makefile.vdpau +++ b/src/gallium/targets/Makefile.vdpau @@ -14,6 +14,13 @@ DEFINES = -DGALLIUM_TRACE -DVER_MAJOR=$(VDPAU_MAJOR) -DVER_MINOR=$(VDPAU_MINOR) LIBS = $(EXTRA_LIB_PATH) $(DRIVER_LIBS) -lvdpau -lXext -lX11 -lm STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/vdpau/libvdpautracker.a +ifeq ($(MESA_LLVM),1) +LDFLAGS += $(LLVM_LDFLAGS) +DRIVER_EXTRAS = $(LLVM_LIBS) +else +LDFLAGS += -lstdc++ +endif + # XXX: Hack, VDPAU public funcs aren't exported if we link to libvdpautracker.a :( OBJECTS = $(C_SOURCES:.c=.o) \ $(ASM_SOURCES:.S=.o) \ @@ -35,7 +42,7 @@ $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ -major $(VDPAU_MAJOR) -minor $(VDPAU_MINOR) $(MKLIB_OPTIONS) \ -install $(TOP)/$(LIB_DIR)/gallium \ - $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) + $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS) $(TOP)/$(LIB_DIR)/gallium: mkdir -p $@ diff --git a/src/gallium/targets/Makefile.xvmc b/src/gallium/targets/Makefile.xvmc index 6abe7f6b062..7182356ed6f 100644 --- a/src/gallium/targets/Makefile.xvmc +++ b/src/gallium/targets/Makefile.xvmc @@ -14,6 +14,14 @@ DEFINES = -DGALLIUM_TRACE $(DRIVER_DEFINES) LIBS = $(EXTRA_LIB_PATH) $(DRIVER_LIBS) -lXv -lX11 -lm STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/xorg/xvmc/libxvmctracker.a +ifeq ($(MESA_LLVM),1) +LDFLAGS += $(LLVM_LDFLAGS) +DRIVER_EXTRAS = $(LLVM_LIBS) +else +LDFLAGS += -lstdc++ +endif + + # XXX: Hack, XvMC public funcs aren't exported if we link to libxvmctracker.a :( OBJECTS = $(C_SOURCES:.c=.o) \ $(ASM_SOURCES:.S=.o) \ @@ -35,7 +43,7 @@ $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ -major $(XVMC_MAJOR) -minor $(XVMC_MINOR) $(MKLIB_OPTIONS) \ -install $(TOP)/$(LIB_DIR)/gallium \ - $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) + $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS) $(TOP)/$(LIB_DIR)/gallium: mkdir -p $@ |