ifeq ($(ENABLE_OPTIMIZED),1)
BuildMode := Release
# Don't use -fomit-frame-pointer on Darwin or FreeBSD.
- ifneq ($(HOST_OS),FreeBSD)
- ifneq ($(HOST_OS),GNU/kFreeBSD)
- ifneq ($(HOST_OS),Darwin)
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin FreeBSD GNU/kFreeBSD))
OmitFramePointer := -fomit-frame-pointer
endif
- endif
- endif
CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer)
C.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer)
Install.StripFlag += -s
endif
-ifdef TOOL_NO_EXPORTS
- DynamicFlags :=
-else
- DynamicFlag := $(RDYNAMIC)
-endif
-
# Adjust linker flags for building an executable
ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ ifndef TOOL_NO_EXPORTS
+ LD.Flags += $(RDYNAMIC)
+ endif
ifneq ($(HOST_OS), Darwin)
ifdef TOOLNAME
- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' $(DynamicFlag)
+ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
endif
else
ifneq ($(DARWIN_MAJVERS),4)
uninstall-local::
$(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
- -$(Verb) $(RM) -f $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME).*
+ -$(Verb) $(RM) -f $(DestSharedLib)
endif
endif