make/common/NativeCompilation.gmk
changeset 28812 6c36bc1ccc0e
parent 28810 86666ec06518
child 28909 58d622f06630
equal deleted inserted replaced
28811:65cf1b4087cf 28812:6c36bc1ccc0e
    85   # param 8 = the objc compiler
    85   # param 8 = the objc compiler
    86   # param 9 = the flags to the assembler
    86   # param 9 = the flags to the assembler
    87 
    87 
    88   ifneq (,$$(filter %.c,$2))
    88   ifneq (,$$(filter %.c,$2))
    89     # Compile as a C file
    89     # Compile as a C file
    90     $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
    90     $1_$2_FLAGS=$(CFLAGS_CCACHE) $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
    91     $1_$2_COMP=$5
    91     $1_$2_COMP=$5
    92     $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
    92     $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
    93   else ifneq (,$$(filter %.m,$2))
    93   else ifneq (,$$(filter %.m,$2))
    94     # Compile as a objective-c file
    94     # Compile as a objective-c file
    95     $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
    95     $1_$2_FLAGS=-x objective-c $(CFLAGS_CCACHE) $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
    96     $1_$2_COMP=$8
    96     $1_$2_COMP=$8
    97     $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
    97     $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
    98   else ifneq (,$$(filter %.s,$2))
    98   else ifneq (,$$(filter %.s,$2))
    99     # Compile as assembler file
    99     # Compile as assembler file
   100     $1_$2_FLAGS=$9 -DTHIS_FILE='"$$(<F)"'
   100     $1_$2_FLAGS=$9 -DTHIS_FILE='"$$(<F)"'
   101     $1_$2_COMP=$(AS)
   101     $1_$2_COMP=$(AS)
   102     $1_$2_DEP_FLAG:=
   102     $1_$2_DEP_FLAG:=
   103   else ifneq (,$$(filter %.cpp,$2)$$(filter %.mm,$2))
   103   else ifneq (,$$(filter %.cpp,$2)$$(filter %.mm,$2))
   104     # Compile as a C++ file
   104     # Compile as a C++ file
   105     $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
   105     $1_$2_FLAGS=$(CFLAGS_CCACHE) $6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
   106     $1_$2_COMP=$7
   106     $1_$2_COMP=$7
   107     $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
   107     $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
   108   else
   108   else
   109     $$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
   109     $$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
   110   endif
   110   endif