common/makefiles/NativeCompilation.gmk

changeset 699
e1a929afcfc4
parent 557
d2c1f80118de
child 707
892a0196d10c
equal deleted inserted replaced
698:e404d321abc6 699:e1a929afcfc4
93 endif 93 endif
94 94
95 $$($1_$2_OBJ) : $2 95 $$($1_$2_OBJ) : $2
96 ifeq ($(COMPILER_TYPE),CC) 96 ifeq ($(COMPILER_TYPE),CC)
97 $$(call COMPILING_MSG,$2,$$($1_TARGET)) 97 $$(call COMPILING_MSG,$2,$$($1_TARGET))
98 # The Sun studio compiler doesn't output the full path to the object file in the
99 # generated deps files. Fixing it with sed. If compiling assembly, don't try this.
100 ifeq ($(COMPILER_NAME)$$(filter %.s,$2),ossc)
101 $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
102 $(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
103 else
98 $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 104 $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
99 endif 105 endif
106 endif
107 # The Visual Studio compiler lacks a feature for generating make dependencies, but by
108 # setting -showIncludes, all included files are printed. These are filtered out and
109 # parsed into make dependences.
100 ifeq ($(COMPILER_TYPE),CL) 110 ifeq ($(COMPILER_TYPE),CL)
101 $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 111 $$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:"
112 ($(ECHO) $$@: \\ \
113 && $(SED) -e '/^Note: including file:/!d' \
114 -e 's|Note: including file: *||' \
115 -e 's|\\|/|g' \
116 -e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
117 -e '/$(subst /,\/,$(TOPDIR))/!d' \
118 -e 's|$$$$| \\|g' \
119 $$($1_$2_DEP).raw) > $$($1_$2_DEP)
102 endif 120 endif
103 endif 121 endif
104 endef 122 endef
105 123
106 define SetupNativeCompilation 124 define SetupNativeCompilation

mercurial