gbuild: More automagic for libmerged
Only gb_Library_use_libraries stays because I think it's a good idea to see
dependent libraries (potential candidates for merging) and hopefully the
list does not change often anyway.
This commit extends b6be3d3db3
Change-Id: I2682456f53cb2e8d7ea63eae15f8979a3c828401
This commit is contained in:
@@ -30,61 +30,7 @@ $(eval $(call gb_Library_use_libraries,merged,\
|
||||
$(gb_UWINAPI) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_static_libraries,merged,\
|
||||
$(if $(filter LINUX,$(OS)),glxtest) \
|
||||
$(if $(filter unx,$(GUIBASE)),headless) \
|
||||
))
|
||||
|
||||
ifeq (ALL,$(MERGELIBS))
|
||||
$(eval $(call gb_Library_use_static_libraries,merged,\
|
||||
ulingu \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(GUIBASE),unx)
|
||||
$(eval $(call gb_Library_add_libs,merged,\
|
||||
-lX11 \
|
||||
-lXext \
|
||||
-lSM \
|
||||
-lICE \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(OS),LINUX)
|
||||
$(eval $(call gb_Library_add_libs,merged,\
|
||||
-lm \
|
||||
-ldl \
|
||||
-lGL \
|
||||
-lGLU \
|
||||
-lpthread \
|
||||
-lrt \
|
||||
-lX11 \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(OS),WNT)
|
||||
$(eval $(call gb_Library_use_system_win32_libs,merged,\
|
||||
advapi32 \
|
||||
gdi32 \
|
||||
gdiplus \
|
||||
glu32 \
|
||||
imm32 \
|
||||
mpr \
|
||||
msimg32 \
|
||||
oldnames \
|
||||
ole32 \
|
||||
oleaut32 \
|
||||
opengl32 \
|
||||
shell32 \
|
||||
shlwapi \
|
||||
setupapi \
|
||||
user32 \
|
||||
usp10 \
|
||||
uuid \
|
||||
version \
|
||||
winmm \
|
||||
winspool \
|
||||
))
|
||||
# prevent warning spamming
|
||||
$(eval $(call gb_Library_add_ldflags,merged,\
|
||||
/ignore:4049 \
|
||||
@@ -96,17 +42,6 @@ ifeq ($(OS),MACOSX)
|
||||
$(eval $(call gb_Library_use_libraries,merged,\
|
||||
AppleRemote \
|
||||
))
|
||||
$(eval $(call gb_Library_add_libs,merged,\
|
||||
-lobjc \
|
||||
))
|
||||
$(eval $(call gb_Library_use_system_darwin_frameworks,merged,\
|
||||
Carbon \
|
||||
Cocoa \
|
||||
CoreFoundation \
|
||||
CoreServices \
|
||||
OpenGL \
|
||||
QuickTime \
|
||||
))
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
@@ -713,6 +713,8 @@ endef
|
||||
# call gb_LinkTarget_add_libs,linktarget,libs
|
||||
define gb_LinkTarget_add_libs
|
||||
$(call gb_LinkTarget_get_target,$(1)) : T_LIBS += $(2)
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,merged)) : T_LIBS += $(2))
|
||||
|
||||
endef
|
||||
|
||||
@@ -893,6 +895,9 @@ endef
|
||||
# call gb_LinkTarget_use_static_libraries,linktarget,staticlibs
|
||||
define gb_LinkTarget_use_static_libraries
|
||||
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS += $$(if $$(filter-out StaticLibrary,$$(TARGETTYPE)),$(2))
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,merged)) : \
|
||||
LINKED_STATIC_LIBS += $$(if $$(filter-out StaticLibrary,$$(TARGETTYPE)),$(2)))
|
||||
|
||||
ifeq ($(DISABLE_DYNLOADING),)
|
||||
$(call gb_LinkTarget_get_target,$(1)) : $(foreach lib,$(2),$(call gb_StaticLibrary_get_target,$(lib)))
|
||||
|
@@ -136,6 +136,8 @@ endef
|
||||
|
||||
define gb_LinkTarget_use_system_darwin_frameworks
|
||||
$(call gb_LinkTarget_add_libs,$(1),$(foreach fw,$(2),-framework $(fw)))
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_add_libs,$(call gb_Library_get_linktarget,merged),$(foreach fw,$(2),-framework $(fw))))
|
||||
endef
|
||||
|
||||
|
||||
|
@@ -198,6 +198,8 @@ endef
|
||||
|
||||
define gb_LinkTarget_use_system_win32_libs
|
||||
$(call gb_LinkTarget_add_libs,$(1),$(foreach lib,$(2),$(call gb_MSVCRT_subst,$(lib)).lib))
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_add_libs,$(call gb_Library_get_linktarget,merged),$(foreach lib,$(2),$(call gb_MSVCRT_subst,$(lib)).lib)))
|
||||
endef
|
||||
|
||||
# Flags common for PE executables (EXEs and DLLs)
|
||||
|
@@ -168,6 +168,8 @@ endef
|
||||
|
||||
define gb_LinkTarget_use_system_darwin_frameworks
|
||||
$(call gb_LinkTarget_add_libs,$(1),$(foreach fw,$(2),-framework $(fw)))
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_add_libs,$(call gb_Library_get_linktarget,merged),$(foreach fw,$(2),-framework $(fw))))
|
||||
endef
|
||||
|
||||
|
||||
|
@@ -144,6 +144,8 @@ endef
|
||||
|
||||
define gb_LinkTarget_use_system_win32_libs
|
||||
$(call gb_LinkTarget_add_libs,$(1),$(foreach lib,$(2),-l$(patsubst oldnames,moldname,$(lib))))
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_add_libs,$(call gb_Library_get_linktarget,merged),$(foreach lib,$(2),-l$(patsubst oldnames,moldname,$(lib)))))
|
||||
endef
|
||||
|
||||
gb_LinkTarget_get_mapfile = \
|
||||
|
Reference in New Issue
Block a user