[DEV] multiple executable destination for MacOSX
This commit is contained in:
parent
0a3b7ca530
commit
dfc960939e
28
core/defs.mk
28
core/defs.mk
@ -702,9 +702,10 @@ endif
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
## Commands for running gcc to link an executable.
|
## Commands for running gcc to link an executable.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
ifeq ("$(TARGET_OS)","MacOs")
|
||||||
define transform-o-to-executable
|
define transform-o-to-executable
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@echo "Executable: $(PRIVATE_MODULE) ==> $(call path-from-top,$@)"
|
@echo "Executable (mac): $(PRIVATE_MODULE) ==> $(call path-from-top,$@)"
|
||||||
$(call check-pwd-is-top-dir)
|
$(call check-pwd-is-top-dir)
|
||||||
$(Q)$(TARGET_CXX) \
|
$(Q)$(TARGET_CXX) \
|
||||||
-o $@ \
|
-o $@ \
|
||||||
@ -718,7 +719,30 @@ $(Q)$(TARGET_CXX) \
|
|||||||
$(TARGET_GLOBAL_LDLIBS)
|
$(TARGET_GLOBAL_LDLIBS)
|
||||||
$(call strip-executable)
|
$(call strip-executable)
|
||||||
endef
|
endef
|
||||||
|
else
|
||||||
|
define transform-o-to-executable
|
||||||
|
@mkdir -p $(dir $@)
|
||||||
|
@echo "Executable: $(PRIVATE_MODULE) ==> $(call path-from-top,$@)"
|
||||||
|
$(call check-pwd-is-top-dir)
|
||||||
|
$(Q)$(TARGET_CXX) \
|
||||||
|
-o $@ \
|
||||||
|
$(TARGET_GLOBAL_LDFLAGS) \
|
||||||
|
-Wl,-Map -Wl,$(basename $@).map \
|
||||||
|
-Wl,-rpath-link=$(TARGET_OUT_STAGING)/lib \
|
||||||
|
-Wl,-rpath-link=$(TARGET_OUT_STAGING)/usr/lib \
|
||||||
|
$(PRIVATE_LDFLAGS) \
|
||||||
|
$(PRIVATE_ALL_OBJECTS) \
|
||||||
|
-Wl,--whole-archive \
|
||||||
|
$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES) \
|
||||||
|
-Wl,--no-whole-archive \
|
||||||
|
-Wl,--as-needed \
|
||||||
|
$(PRIVATE_ALL_STATIC_LIBRARIES) \
|
||||||
|
$(PRIVATE_ALL_SHARED_LIBRARIES) \
|
||||||
|
$(PRIVATE_LDLIBS) \
|
||||||
|
$(TARGET_GLOBAL_LDLIBS)
|
||||||
|
$(call strip-executable)
|
||||||
|
endef
|
||||||
|
endif
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## Commands for copying files.
|
## Commands for copying files.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user