summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-01-03 19:37:03 +0200
committerTor Lillqvist <tml@iki.fi>2013-01-03 20:21:51 +0200
commit3e1a0ff45ea8fcb95505e03b5ce2418c077c214c (patch)
tree37d5e21348bf43d7f62024ab3506ccd84cdac7dc /solenv
parent449d657b10446e77b388ff01d4f595b50ecf7c49 (diff)
Factor out gb_ObjCxxObject__command and gb_ObjCObject__command
They should be the same for Mac OS X and iOS, so keep just one copy, in com_GCC_class.mk. (Actually the iOS one was missing the gb_VISIBILITY_FLAGS, which caused some linker warnings.) Change-Id: I340fd7e262459bcc2b083c807b783d64d52040ee
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/IOS_ARM_GCC.mk37
-rw-r--r--solenv/gbuild/platform/com_GCC_class.mk38
-rw-r--r--solenv/gbuild/platform/macosx.mk39
3 files changed, 38 insertions, 76 deletions
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 944bac7093ee..7ab1bc8edeea 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -81,43 +81,6 @@ gb_LinkTarget_LDFLAGS := \
gb_DEBUG_CFLAGS := -g -fno-inline
-# ObjCxxObject class
-
-define gb_ObjCxxObject__command
-$(call gb_Output_announce,$(2).mm,$(true),OCX,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CXX) \
- $(DEFS) \
- $(T_OBJCXXFLAGS) \
- $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-# ObjCObject class
-
-define gb_ObjCObject__command
-$(call gb_Output_announce,$(2).m,$(true),OCC,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) && \
- mkdir -p $(dir $(call gb_ObjCObject_get_dep_target,$(2))) && \
- $(gb_CC) \
- $(DEFS) $(OBJCFLAGS) \
- $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(call gb_ObjCObject_get_target,$(2)) \
- -MP -MF $(call gb_ObjCObject_get_dep_target,$(2)) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-
# LinkTarget class
gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 80a168e8584a..350e00010fcf 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -132,6 +132,44 @@ $(call gb_Helper_abbreviate_dirs,\
)
endef
+# ObjCxxObject class
+
+define gb_ObjCxxObject__command
+$(call gb_Output_announce,$(2).mm,$(true),OCX,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) $(dir $(4)) && \
+ $(gb_CXX) \
+ $(DEFS) \
+ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
+ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
+ $(T_OBJCXXFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MMD -MT $(1) \
+ -MP -MF $(4) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
+# ObjCObject class
+
+define gb_ObjCObject__command
+$(call gb_Output_announce,$(2).m,$(true),OCC,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) $(dir $(4)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
+ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
+ $(T_OBJCFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MMD -MT $(1) \
+ -MP -MF $(4) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
define gb_SrsPartTarget__command_dep
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && cd $(SRCDIR) && \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index b2905bd21df2..ed596e7b3c13 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -97,45 +97,6 @@ gb_DEBUG_CFLAGS := -g
gb_COMPILEROPTFLAGS := -O2
gb_COMPILERNOOPTFLAGS := -O0
-# ObjCxxObject class
-
-define gb_ObjCxxObject__command
-$(call gb_Output_announce,$(2).mm,$(true),OCX,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CXX) \
- $(DEFS) \
- $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
- $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
- $(T_OBJCXXFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-# ObjCObject class
-
-define gb_ObjCObject__command
-$(call gb_Output_announce,$(2).m,$(true),OCC,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CC) \
- $(DEFS) \
- $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
- $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
- $(T_OBJCFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-
# LinkTarget class
define gb_LinkTarget__get_rpath_for_layer