Kaydet (Commit) dc397aae authored tarafından Michael Stahl's avatar Michael Stahl

gbuild: gb_Library_PLAINLIBS_NONE cleanup for WNT:

add a new gb_LinkTarget_use_system_win32_libs to abstract different
linker options on MSVC and GCC.

Change-Id: Ic9bf2545f59bf7871e6fc06b290c486ddfbec03d
üst 80374355
......@@ -107,14 +107,14 @@ $(eval $(call gb_Library_add_libs,merged,\
endif
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,merged,\
$(eval $(call gb_Library_use_system_win32_libs,merged,\
advapi32 \
gdi32 \
gdiplus \
imm32 \
mpr \
msimg32 \
$(gb_Library_win32_OLDNAMES) \
oldnames \
ole32 \
oleaut32 \
shell32 \
......
......@@ -1468,7 +1468,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
-lobjc \
)
else ifeq ($(OS),WNT)
$(call gb_LinkTarget_use_libraries,$(1),\
$(call gb_LinkTarget_use_system_win32_libs,$(1),\
advapi32 \
gdi32 \
)
......@@ -1614,7 +1614,7 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
ifeq ($(GUI)$(COM),WNTMSC)
$(call gb_LinkTarget_use_external,$(1),openssl)
$(call gb_LinkTarget_use_libraries,$(1),\
$(call gb_LinkTarget_use_system_win32_libs,$(1),\
secur32 \
ws2_32 \
)
......
......@@ -132,21 +132,17 @@ gb_Library_FILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_FILENAMES))
# change the names of all import libraries that don't have an "i" prefix as in our standard naming schema
gb_Library_NOILIBFILENAMES := $(gb_Library_PLAINLIBS_NONE)
gb_Library_NOILIBFILENAMES += \
gb_Library_NOILIBFILENAMES := \
glib-2.0 \
gmodule-2.0 \
graphite2_off \
icudt icuin icule icuuc \
langtag \
lcms2 \
msvcprt \
nspr4 \
nss3 \
shlwapi \
smime3 \
uwinapi \
version \
gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
gb_Library_FILENAMES += $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):$(lib)$(gb_Library_PLAINEXT))
......
......@@ -41,9 +41,6 @@ $(eval $(call gb_Library_use_libraries,avmediawin,\
comphelper \
cppu \
cppuhelper \
gdi32 \
ole32 \
oleaut32 \
sal \
tl \
utl \
......@@ -53,8 +50,11 @@ $(eval $(call gb_Library_use_libraries,avmediawin,\
$(eval $(call gb_Library_add_standard_system_libs,avmediawin))
$(eval $(call gb_Library_add_libs,avmediawin,\
strmiids.lib \
$(eval $(call gb_Library_use_system_win32_libs,avmediawin,\
gdi32 \
ole32 \
oleaut32 \
strmiids \
))
$(eval $(call gb_Library_add_exception_objects,avmediawin,\
......
......@@ -124,7 +124,7 @@ $(eval $(call gb_SdiTarget_set_include,basctl/sdi/basslots,\
))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,basctl,\
$(eval $(call gb_Library_use_system_win32_libs,basctl,\
advapi32 \
gdi32 \
shell32 \
......
......@@ -34,7 +34,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_enable, \
$(eval $(call gb_CppunitTest_add_standard_system_libs,basic_enable))
ifeq ($(GUI),WNT)
$(eval $(call gb_CppunitTest_use_libraries,basic_enable, \
$(eval $(call gb_CppunitTest_use_system_win32_libs,basic_enable, \
oleaut32 \
))
endif
......
......@@ -35,7 +35,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_nested_struct, \
$(eval $(call gb_CppunitTest_add_standard_system_libs,basic_nested_struct))
ifeq ($(GUI),WNT)
$(eval $(call gb_CppunitTest_use_libraries,basic_nested_struct, \
$(eval $(call gb_CppunitTest_use_system_win32_libs,basic_nested_struct, \
oleaut32 \
))
endif
......
......@@ -35,7 +35,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_scanner, \
$(eval $(call gb_CppunitTest_add_standard_system_libs,basic_scanner))
ifeq ($(GUI),WNT)
$(eval $(call gb_CppunitTest_use_libraries,basic_scanner, \
$(eval $(call gb_CppunitTest_use_system_win32_libs,basic_scanner, \
oleaut32 \
))
endif
......
......@@ -47,10 +47,13 @@ endif
ifeq ($(GUI),WNT)
$(eval $(call gb_Library_use_libraries,officebean,\
jawt \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_system_win32_libs,officebean,\
jawt \
))
else
$(eval $(call gb_Library_add_libs,officebean,\
......
......@@ -87,7 +87,7 @@ endif
endif
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,canvastools,\
$(eval $(call gb_Library_use_system_win32_libs,canvastools,\
winmm \
))
endif
......
......@@ -60,7 +60,7 @@ $(eval $(call gb_Library_use_libraries,directx9canvas,\
$(eval $(call gb_Library_add_standard_system_libs,directx9canvas))
$(eval $(call gb_Library_use_libraries,directx9canvas,\
$(eval $(call gb_Library_use_system_win32_libs,directx9canvas,\
d3d9 \
gdi32 \
gdiplus \
......
......@@ -66,7 +66,7 @@ $(eval $(call gb_Library_use_libraries,gdipluscanvas,\
$(eval $(call gb_Library_add_standard_system_libs,gdipluscanvas))
$(eval $(call gb_Library_use_libraries,gdipluscanvas,\
$(eval $(call gb_Library_use_system_win32_libs,gdipluscanvas,\
gdi32 \
gdiplus \
))
......
......@@ -24,13 +24,16 @@ $(eval $(call gb_Executable_use_internal_bootstrap_api,climaker,\
$(eval $(call gb_Executable_use_libraries,climaker,\
cppu \
cppuhelper \
sal \
$(gb_UWINAPI) \
))
$(eval $(call gb_Executable_use_system_win32_libs,climaker,\
mscoree \
$(if $(USE_DEBUG_RUNTIME) \
,msvcmrtd \
,msvcmrt \
) \
sal \
$(gb_UWINAPI) \
))
$(eval $(call gb_Executable_add_standard_system_libs,climaker))
......
......@@ -33,16 +33,19 @@ $(eval $(call gb_Library_use_packages,cli_cppuhelper_native,\
))
$(eval $(call gb_Library_use_libraries,cli_cppuhelper_native,\
advapi32 \
cppu \
cppuhelper \
sal \
))
$(eval $(call gb_Library_use_system_win32_libs,cli_cppuhelper_native,\
advapi32 \
delayimp \
mscoree \
$(if $(USE_DEBUG_RUNTIME)\
,msvcmrtd \
,msvcmrt \
) \
sal \
))
$(eval $(call gb_Library_add_exception_objects,cli_cppuhelper_native,\
......
......@@ -19,12 +19,15 @@ $(eval $(call gb_Library_use_udk_api,cli_uno))
$(eval $(call gb_Library_use_libraries,cli_uno,\
cppu \
sal \
))
$(eval $(call gb_Library_use_system_win32_libs,cli_uno,\
mscoree \
$(if $(USE_DEBUG_RUNTIME)\
,msvcmrtd \
,msvcmrt \
) \
sal \
))
$(eval $(call gb_Library_add_exception_objects,cli_uno,\
......
......@@ -42,14 +42,17 @@ $(eval $(call gb_Library_add_cxxflags,ado,\
))
endif
$(eval $(call gb_Library_use_system_win32_libs,ado,\
ole32 \
oleaut32 \
uuid \
))
$(eval $(call gb_Library_use_libraries,ado,\
cppu \
cppuhelper \
sal \
salhelper \
ole32 \
oleaut32 \
uuid \
dbtools \
comphelper \
$(gb_UWINAPI) \
......
......@@ -46,7 +46,7 @@ $(eval $(call gb_Library_use_libraries,postgresql-sdbc-impl,\
$(eval $(call gb_Library_add_standard_system_libs,postgresql-sdbc-impl))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,postgresql-sdbc-impl,\
$(eval $(call gb_Library_use_system_win32_libs,postgresql-sdbc-impl,\
shell32 \
wldap32 \
))
......
......@@ -78,7 +78,7 @@ $(eval $(call gb_Library_use_externals,cui,\
))
ifeq ($(GUI),WNT)
$(eval $(call gb_Library_use_libraries,cui,\
$(eval $(call gb_Library_use_system_win32_libs,cui,\
advapi32 \
shlwapi \
))
......
......@@ -76,7 +76,7 @@ $(eval $(call gb_Library_use_libraries,dbu,\
$(eval $(call gb_Library_add_standard_system_libs,dbu))
ifeq ($(GUI),WNT)
$(eval $(call gb_Library_use_libraries,dbu,\
$(eval $(call gb_Library_use_system_win32_libs,dbu,\
ole32 \
oleaut32 \
uuid \
......
......@@ -33,12 +33,15 @@ $(eval $(call gb_Executable_set_include,quickstart,\
$$(INCLUDE) \
))
$(eval $(call gb_Executable_use_libraries,quickstart,\
$(eval $(call gb_Executable_use_system_win32_libs,quickstart,\
comdlg32 \
gdi32 \
ole32 \
oleaut32 \
shell32 \
))
$(eval $(call gb_Executable_use_libraries,quickstart,\
$(gb_UWINAPI) \
))
......@@ -46,14 +49,14 @@ $(eval $(call gb_Executable_add_standard_system_libs,quickstart))
ifeq ($(COM),GCC)
$(eval $(call gb_Executable_use_libraries,quickstart,\
$(eval $(call gb_Executable_use_system_win32_libs,quickstart,\
uuid \
))
else
$(eval $(call gb_Executable_add_libs,quickstart,\
comsupp.lib \
$(eval $(call gb_Executable_use_system_win32_libs,quickstart,\
comsupp \
))
endif
......
......@@ -30,10 +30,13 @@ $(eval $(call gb_Executable_Executable,soffice))
$(eval $(call gb_Executable_set_targettype_gui,soffice,YES))
$(eval $(call gb_Executable_use_libraries,soffice,\
$(gb_UWINAPI) \
))
$(eval $(call gb_Executable_use_system_win32_libs,soffice,\
advapi32 \
shell32 \
shlwapi \
$(gb_UWINAPI) \
))
$(eval $(call gb_Executable_add_standard_system_libs,soffice))
......
......@@ -60,7 +60,7 @@ $(eval $(call gb_Library_add_standard_system_libs,deploymentgui))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,deploymentgui,\
$(eval $(call gb_Library_use_system_win32_libs,deploymentgui,\
ole32 \
))
......
......@@ -37,17 +37,19 @@ $(eval $(call gb_Library_set_include,dnd,\
$(eval $(call gb_Library_use_sdk_api,dnd))
$(eval $(call gb_Library_use_libraries,dnd,\
advapi32 \
cppu \
cppuhelper \
sal \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_system_win32_libs,dnd,\
advapi32 \
gdi32 \
ole32 \
oleaut32 \
sal \
shell32 \
uuid \
uwinapi \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_standard_system_libs,dnd))
......
......@@ -37,16 +37,18 @@ $(eval $(call gb_Library_set_include,ftransl,\
$(eval $(call gb_Library_use_sdk_api,ftransl))
$(eval $(call gb_Library_use_libraries,ftransl,\
advapi32 \
cppu \
cppuhelper \
gdi32 \
ole32 \
sal \
uwinapi \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_system_win32_libs,ftransl,\
advapi32 \
gdi32 \
ole32 \
))
$(eval $(call gb_Library_add_standard_system_libs,ftransl))
$(eval $(call gb_Library_use_static_libraries,ftransl,\
......
......@@ -42,17 +42,19 @@ $(eval $(call gb_Library_add_defs,sysdtrans,\
))
$(eval $(call gb_Library_use_libraries,sysdtrans,\
advapi32 \
cppu \
cppuhelper \
sal \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_system_win32_libs,sysdtrans,\
advapi32 \
gdi32 \
ole32 \
oleaut32 \
sal \
shell32 \
uuid \
uwinapi \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_standard_system_libs,sysdtrans))
......
......@@ -63,6 +63,9 @@ ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,emboleobj,\
embobj \
))
$(eval $(call gb_Library_use_system_win32_libs,emboleobj,\
gdi32 \
ole32 \
oleaut32 \
......
......@@ -45,12 +45,15 @@ $(eval $(call gb_Library_use_libraries,emser,\
comphelper \
cppu \
cppuhelper \
sal \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_system_win32_libs,emser,\
gdi32 \
ole32 \
oleaut32 \
sal \
uuid \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_standard_system_libs,emser))
......
......@@ -32,10 +32,13 @@ $(eval $(call gb_Library_set_include,inprocserv,\
$$(INCLUDE) \
))
$(eval $(call gb_Library_use_libraries,inprocserv,\
$(eval $(call gb_Library_use_system_win32_libs,inprocserv,\
gdi32 \
ole32 \
uuid \
))
$(eval $(call gb_Library_use_libraries,inprocserv,\
$(gb_UWINAPI) \
))
......
......@@ -45,7 +45,7 @@ $(eval $(call gb_CppunitTest_use_libraries,extensions_test_update, \
$(eval $(call gb_CppunitTest_add_standard_system_libs,extensions_test_update))
ifeq ($(OS),WNT)
$(eval $(call gb_CppunitTest_use_libraries,extensions_test_update,\
$(eval $(call gb_CppunitTest_use_system_win32_libs,extensions_test_update,\
shell32 \
ole32 \
))
......
......@@ -67,18 +67,18 @@ $(eval $(call gb_Executable_use_static_libraries,nsplugin,\
ooopathutils \
))
$(eval $(call gb_Executable_use_libraries,nsplugin,\
ws2_32 \
shell32 \
ole32 \
kernel32 \
user32 \
gdi32 \
winspool \
comdlg32 \
$(eval $(call gb_Executable_use_system_win32_libs,nsplugin,\
advapi32 \
comdlg32 \
gdi32 \
kernel32 \
ole32 \
oleaut32 \
shell32 \
user32 \
uuid \
winspool \
ws2_32 \
))
endif # WNT
......
......@@ -54,7 +54,7 @@ $(eval $(call gb_Library_use_libraries,ldapbe2,\
))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,ldapbe2,\
$(eval $(call gb_Library_use_system_win32_libs,ldapbe2,\
wldap32 \
))
else # 0S!=WNT
......
......@@ -69,18 +69,18 @@ $(eval $(call gb_Library_use_static_libraries,npsoplugin,\
ooopathutils \
))
$(eval $(call gb_Library_use_libraries,npsoplugin,\
ws2_32 \
shell32 \
ole32 \
kernel32 \
user32 \
gdi32 \
winspool \
comdlg32 \
$(eval $(call gb_Library_use_system_win32_libs,npsoplugin,\
advapi32 \
comdlg32 \
gdi32 \
kernel32 \
ole32 \
oleaut32 \
shell32 \
user32 \
uuid \
winspool \
ws2_32 \
))
$(eval $(call gb_Library_add_defs,npsoplugin,\
......
......@@ -43,6 +43,9 @@ $(eval $(call gb_Library_use_libraries,oleautobridge,\
cppuhelper \
cppu \
sal \
))
$(eval $(call gb_Library_use_system_win32_libs,oleautobridge,\
advapi32 \
ole32 \
oleaut32 \
......
......@@ -47,6 +47,9 @@ $(eval $(call gb_Library_use_libraries,oleautobridge2,\
cppuhelper \
cppu \
sal \
))
$(eval $(call gb_Library_use_system_win32_libs,oleautobridge2,\
advapi32 \
ole32 \
oleaut32 \
......
......@@ -63,10 +63,10 @@ $(eval $(call gb_Library_add_libs,pl,\
endif # OS=SOLARIS
ifeq ($(GUI),WNT)
$(eval $(call gb_Library_use_libraries,pl,\
version \
ole32 \
$(eval $(call gb_Library_use_system_win32_libs,pl,\
advapi32 \
ole32 \
version \
))
$(eval $(call gb_Library_add_exception_objects,pl,\
......
......@@ -54,14 +54,14 @@ $(eval $(call gb_Library_add_ldflags,so_activex,\
/DEF:$(SRCDIR)/extensions/source/activex/so_activex.def \
))
$(eval $(call gb_Library_use_libraries,so_activex,\
uuid \
$(eval $(call gb_Library_use_system_win32_libs,so_activex,\
advapi32 \
gdi32 \
ole32 \
oleaut32 \
gdi32 \
urlmon \
shlwapi \
urlmon \
uuid \
))
ifneq ($(USE_DEBUG_RUNTIME),)
......
......@@ -57,14 +57,14 @@ $(eval $(call gb_Library_add_ldflags,so_activex_x64,\
/DEF:$(SRCDIR)/extensions/source/activex/so_activex.def \
))
$(eval $(call gb_Library_use_libraries,so_activex_x64,\
uuid \
$(eval $(call gb_Library_use_system_win32_libs,so_activex_x64,\
advapi32 \
gdi32 \
ole32 \
oleaut32 \
gdi32 \
urlmon \
shlwapi \
urlmon \
uuid \
))
ifneq ($(USE_DEBUG_RUNTIME),)
......
......@@ -45,7 +45,7 @@ $(eval $(call gb_Library_use_libraries,updchk,\
))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,updchk,\
$(eval $(call gb_Library_use_system_win32_libs,updchk,\
ole32 \
shell32 \
wininet \
......
......@@ -52,6 +52,10 @@ $(eval $(call gb_Library_use_libraries,fps,\
tl \
utl \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_system_win32_libs,fps,\
advapi32 \
comdlg32 \
gdi32 \
......@@ -60,7 +64,6 @@ $(eval $(call gb_Library_use_libraries,fps,\
oleaut32 \
shell32 \
uuid \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_standard_system_libs,fps))
......
......@@ -76,7 +76,7 @@ $(eval $(call gb_Library_add_exception_objects,fwi,\
))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,fwi,\
$(eval $(call gb_Library_use_system_win32_libs,fwi,\
advapi32 \
))
endif
......
......@@ -47,7 +47,7 @@ $(eval $(call gb_Library_use_external,hwp,zlib))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,hwp,\
$(eval $(call gb_Library_use_system_win32_libs,hwp,\
ole32 \
uuid \
))
......
......@@ -50,8 +50,8 @@ $(eval $(call gb_Library_use_libraries,jvmfwk,\
$(eval $(call gb_Library_add_standard_system_libs,jvmfwk))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,jvmfwk,\
advapi32 \
$(eval $(call gb_Library_use_system_win32_libs,jvmfwk,\
advapi32 \
))
endif
......
......@@ -62,9 +62,8 @@ $(eval $(call gb_Library_use_libraries,sunjavaplugin,\
endif
ifeq ($(GUI),WNT)
$(eval $(call gb_Library_use_libraries,sunjavaplugin,\
advapi32 \
uwinapi \
$(eval $(call gb_Library_use_system_win32_libs,sunjavaplugin,\
advapi32 \
))
endif
......
......@@ -47,7 +47,7 @@ $(eval $(call gb_Library_add_generated_cobjects,neon,\
))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,neon,\
$(eval $(call gb_Library_use_system_win32_libs,neon,\
ws2_32 \
))
......
......@@ -57,21 +57,22 @@ $(eval $(call gb_Library_add_defs,sal,\
))
$(eval $(call gb_Library_use_libraries,sal,\
$(if $(filter $(OS),WNT), \
advapi32 \
comdlg32 \
mpr \
ole32 \
shell32 \
user32 \
ws2_32 \
) \
$(if $(filter $(OS),ANDROID), \
lo-bootstrap \
) \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_system_win32_libs,sal,\
advapi32 \
comdlg32 \
mpr \
ole32 \
shell32 \
user32 \
ws2_32 \
))
$(eval $(call gb_Library_add_libs,sal,\
$(if $(filter $(GUI),UNX), \
$(if $(filter $(OS),ANDROID),, \
......
......@@ -27,7 +27,7 @@
$(eval $(call gb_Library_Library,uwinapi))
$(eval $(call gb_Library_use_libraries,uwinapi,\
$(eval $(call gb_Library_use_system_win32_libs,uwinapi,\
$(if $(filter $(COM),MSC), \
kernel32 \
msvcrt \
......
......@@ -121,10 +121,10 @@ $(eval $(call gb_Library_add_exception_objects,scui,\