From 9d9c26ba19c9c27c96f096e0a167609932bc2200 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 27 Jan 2011 18:37:48 +0100 Subject: vcl2gnumake: #i116588# support all optional link and cflags --- vcl/Library_vclplug_gen.mk | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'vcl/Library_vclplug_gen.mk') diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk index cca106caf419..7d534aa211a3 100644 --- a/vcl/Library_vclplug_gen.mk +++ b/vcl/Library_vclplug_gen.mk @@ -121,6 +121,80 @@ $(eval $(call gb_Library_set_defs,vclplug_gen,\ -DVCLPLUG_GEN_IMPLEMENTATION \ )) + +## handle RandR +ifneq ($(ENABLE_RANDR),) +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DUSE_RANDR \ +)) +ifeq ($(XRANDR_DLOPEN),FALSE) +$(eval $(call gb_Library_set_cxxflags,vclplug_gen,\ + $$(CXXFLAGS) \ + $$(XRANDR_CFLAGS) \ +)) +else +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DXRANDR_DLOPEN \ +)) +endif +endif + +## handle Xinerama +ifneq ($(USE_XINERAMA),NO) +ifneq ($(OS),SOLARIS) +# not Solaris +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DUSE_XINERAMA_XORG \ +)) +ifeq ($(XINERAMA_LINK),dynamic) +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -lXinerama \ +)) +else +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \ +)) +endif +else +# Solaris +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DUSE_XINERAMA_XSUN \ +)) +ifeq ($(USE_XINERAMA_VERSION),Xorg) +# Solaris, Xorg +ifeq ($(XINERAMA_LINK),dynamic) +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -lXinerama \ +)) +else +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \ +)) +endif +endif +endif +endif + +## handle Render linking +ifeq ($(XRENDER_LINK),YES) +$(eval $(call gb_Library_set_defs,vclplug_gen,\ + $$(DEFS) \ + -DXRENDER_LINK \ +)) +$(eval $(call gb_Library_set_ldflags,vclplug_gen,\ + $$(LDFLAGS) \ + $(shell pkg-config --libs xrender) \ +)) +endif + ifeq ($(OS),LINUX) $(eval $(call gb_Library_add_linked_libs,vclplug_gen,\ dl \ -- cgit