solaris.mk (386ca866) | solaris.mk (f006f9b4) |
---|---|
1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 197 unchanged lines hidden (view full) --- 206gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 207 208define gb_LinkTarget__command_dynamiclink 209$(call gb_Helper_abbreviate_dirs,\ 210 mkdir -p $(dir $(1)) && \ 211 $(gb_CXX) \ 212 $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ 213 $(if $(VERSIONMAP),$(gb_Library_VERSIONMAPFLAG) $(VERSIONMAP)) \ | 1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 197 unchanged lines hidden (view full) --- 206gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 207 208define gb_LinkTarget__command_dynamiclink 209$(call gb_Helper_abbreviate_dirs,\ 210 mkdir -p $(dir $(1)) && \ 211 $(gb_CXX) \ 212 $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ 213 $(if $(VERSIONMAP),$(gb_Library_VERSIONMAPFLAG) $(VERSIONMAP)) \ |
214 $(if $(call gb_Library_is_udk_versioned,$(1)),-Wl$(COMMA)-h$(notdir $(1)).$(gb_UDK_MAJOR)) \ |
|
214 $(subst \d,$$,$(RPATH)) \ 215 $(T_LDFLAGS) \ 216 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 217 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 218 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 219 $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ 220 $(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \ 221 $(patsubst %,-l%,$(EXTERNAL_LIBS)) \ 222 $(LIBS) \ | 215 $(subst \d,$$,$(RPATH)) \ 216 $(T_LDFLAGS) \ 217 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 218 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 219 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 220 $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ 221 $(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \ 222 $(patsubst %,-l%,$(EXTERNAL_LIBS)) \ 223 $(LIBS) \ |
223 -o $(1)) | 224 -o $(if $(call gb_Library_is_udk_versioned,$(1)),$(1).$(gb_UDK_MAJOR),$(1))) |
224endef 225 | 225endef 226 |
227define gb_LinkTarget__command_symlink_udk_versioned_library 228 $(if $(call gb_Library_is_udk_versioned,$(1)), 229 $(call gb_Helper_abbreviate_dirs,\ 230 rm -f $(1) && ln -s $(notdir $(1)).$(gb_UDK_MAJOR) $(1))) 231endef 232 |
|
226define gb_LinkTarget__command_staticlink 227$(call gb_Helper_abbreviate_dirs,\ 228 mkdir -p $(dir $(1)) && \ 229 $(gb_AR) -rsu $(1) \ 230 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 231 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 232 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 233 2> /dev/null) 234endef 235 236define gb_LinkTarget__command 237$(call gb_Output_announce,$(2),$(true),LNK,4) 238$(if $(filter Library GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1))) | 233define gb_LinkTarget__command_staticlink 234$(call gb_Helper_abbreviate_dirs,\ 235 mkdir -p $(dir $(1)) && \ 236 $(gb_AR) -rsu $(1) \ 237 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 238 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 239 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 240 2> /dev/null) 241endef 242 243define gb_LinkTarget__command 244$(call gb_Output_announce,$(2),$(true),LNK,4) 245$(if $(filter Library GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1))) |
246$(if $(filter Library,$(TARGETTYPE)),$(call gb_LinkTarget__command_symlink_udk_versioned_library,$(1))) |
|
239$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1))) 240endef 241 242# Library class 243 244gb_Library_DEFS := 245gb_Library_TARGETTYPEFLAGS := -Bdynamic -z text -G 246gb_Library_SYSPRE := lib --- 58 unchanged lines hidden (view full) --- 305 306define gb_Library_get_rpath 307'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))' 308endef 309 310define gb_Library_Library_platform 311$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1)) 312 | 247$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1))) 248endef 249 250# Library class 251 252gb_Library_DEFS := 253gb_Library_TARGETTYPEFLAGS := -Bdynamic -z text -G 254gb_Library_SYSPRE := lib --- 58 unchanged lines hidden (view full) --- 313 314define gb_Library_get_rpath 315'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))' 316endef 317 318define gb_Library_Library_platform 319$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1)) 320 |
321ifneq (,$(call gb_Library_is_udk_versioned,$(call gb_Library_get_target,$(1)))) 322$(call gb_Library_get_target,$(1)) \ 323$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS += \ 324 $(call gb_Library_get_target,$(1)).$(gb_UDK_MAJOR) 325endif |
|
313endef 314 315 316# StaticLibrary class 317 318gb_StaticLibrary_DEFS := 319gb_StaticLibrary_SYSPRE := lib 320gb_StaticLibrary_PLAINEXT := .a --- 104 unchanged lines hidden --- | 326endef 327 328 329# StaticLibrary class 330 331gb_StaticLibrary_DEFS := 332gb_StaticLibrary_SYSPRE := lib 333gb_StaticLibrary_PLAINEXT := .a --- 104 unchanged lines hidden --- |