< prev index next >

make/common/NativeCompilation.gmk

Print this page




 280     endif
 281 
 282     ifeq ($$(filter %.s %.S, $$($1_FILENAME)), )
 283       # And this is the dependency file for this obj file.
 284       $1_DEP := $$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_OBJ))
 285       # The dependency target file lists all dependencies as empty targets to
 286       # avoid make error "No rule to make target" for removed files
 287       $1_DEP_TARGETS := $$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_OBJ))
 288 
 289       # Include previously generated dependency information. (if it exists)
 290       -include $$($1_DEP)
 291       -include $$($1_DEP_TARGETS)
 292     endif
 293 
 294     ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
 295       $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)
 296       $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
 297     endif
 298 
 299     $$($1_OBJ): $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
 300         $$($1_VARDEPS_FILE) | $$($$($1_BASE)_BUILD_INFO)
 301         $$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME)))
 302         $$(call MakeDir, $$(@D))
 303         ifneq ($(TOOLCHAIN_TYPE), microsoft)
 304           ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s, $$($1_FILENAME)), solstudio)
 305             # The Solaris studio compiler doesn't output the full path to the
 306             # object file in the generated deps files. Fixing it with sed. If
 307             # compiling assembly, don't try this.
 308             $$(call ExecuteWithLog, $$@, \
 309                 $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP).tmp \
 310                     $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
 311             $(SED) 's|^$$(@F):|$$@:|' $$($1_DEP).tmp > $$($1_DEP)
 312           else
 313             $$(call ExecuteWithLog, $$@, \
 314                 $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP) \
 315                     $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
 316           endif
 317           # Create a dependency target file from the dependency file.
 318           # Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
 319           ifneq ($$($1_DEP), )
 320             $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)


 349 # Remaining parameters are named arguments. These include:
 350 #   NAME The base name for the resulting binary, excluding decorations (like *.exe)
 351 #   TYPE Type of binary (EXECUTABLE, LIBRARY or STATIC_LIBRARY). Default is LIBRARY.
 352 #   SUFFIX Override the default suffix for the output file
 353 #   TOOLCHAIN Name of toolchain setup to use. Defaults to TOOLCHAIN_DEFAULT.
 354 #   SRC one or more directory roots to scan for C/C++ files.
 355 #   CFLAGS the compiler flags to be used, used both for C and C++.
 356 #   CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
 357 #   LDFLAGS the linker flags to be used, used both for C and C++.
 358 #   LIBS the libraries to link to
 359 #   ARFLAGS the archiver flags to be used
 360 #   OBJECT_DIR the directory where we store the object files
 361 #   OUTPUT_DIR the directory where the resulting binary is put
 362 #   INCLUDES only pick source from these directories
 363 #   EXCLUDES do not pick source from these directories
 364 #   INCLUDE_FILES only compile exactly these files!
 365 #   EXCLUDE_FILES with these names
 366 #   EXCLUDE_PATTERN exclude files matching any of these substrings
 367 #   EXTRA_FILES List of extra files not in any of the SRC dirs
 368 #   EXTRA_OBJECT_FILES List of extra object files to include when linking

 369 #   VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
 370 #   RC_FLAGS flags for RC.
 371 #   EMBED_MANIFEST if true, embed manifest on Windows.
 372 #   MAPFILE mapfile
 373 #   REORDER reorder file
 374 #   USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the
 375 #       mapfile for the output symbols file
 376 #   CC the compiler to use, default is $(CC)
 377 #   LD the linker to use, default is $(LD)
 378 #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST, HIGHEST_JVM, SIZE
 379 #   DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
 380 #   DISABLED_WARNINGS_C_<toolchain> Disable the given warnings for the specified toolchain
 381 #       when compiling C code
 382 #   DISABLED_WARNINGS_CXX_<toolchain> Disable the given warnings for the specified
 383 #       toolchain when compiling C++ code
 384 #   STRIP_SYMBOLS Set to false to override global strip policy and always leave
 385 #       symbols in the binary, if the toolchain allows for it
 386 #   DEBUG_SYMBOLS Set to false to disable generation of debug symbols
 387 #   COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying
 388 #   ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol




 280     endif
 281 
 282     ifeq ($$(filter %.s %.S, $$($1_FILENAME)), )
 283       # And this is the dependency file for this obj file.
 284       $1_DEP := $$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_OBJ))
 285       # The dependency target file lists all dependencies as empty targets to
 286       # avoid make error "No rule to make target" for removed files
 287       $1_DEP_TARGETS := $$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_OBJ))
 288 
 289       # Include previously generated dependency information. (if it exists)
 290       -include $$($1_DEP)
 291       -include $$($1_DEP_TARGETS)
 292     endif
 293 
 294     ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
 295       $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)
 296       $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
 297     endif
 298 
 299     $$($1_OBJ): $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
 300         $$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE) | $$($$($1_BASE)_BUILD_INFO)
 301         $$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME)))
 302         $$(call MakeDir, $$(@D))
 303         ifneq ($(TOOLCHAIN_TYPE), microsoft)
 304           ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s, $$($1_FILENAME)), solstudio)
 305             # The Solaris studio compiler doesn't output the full path to the
 306             # object file in the generated deps files. Fixing it with sed. If
 307             # compiling assembly, don't try this.
 308             $$(call ExecuteWithLog, $$@, \
 309                 $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP).tmp \
 310                     $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
 311             $(SED) 's|^$$(@F):|$$@:|' $$($1_DEP).tmp > $$($1_DEP)
 312           else
 313             $$(call ExecuteWithLog, $$@, \
 314                 $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP) \
 315                     $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
 316           endif
 317           # Create a dependency target file from the dependency file.
 318           # Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
 319           ifneq ($$($1_DEP), )
 320             $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)


 349 # Remaining parameters are named arguments. These include:
 350 #   NAME The base name for the resulting binary, excluding decorations (like *.exe)
 351 #   TYPE Type of binary (EXECUTABLE, LIBRARY or STATIC_LIBRARY). Default is LIBRARY.
 352 #   SUFFIX Override the default suffix for the output file
 353 #   TOOLCHAIN Name of toolchain setup to use. Defaults to TOOLCHAIN_DEFAULT.
 354 #   SRC one or more directory roots to scan for C/C++ files.
 355 #   CFLAGS the compiler flags to be used, used both for C and C++.
 356 #   CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
 357 #   LDFLAGS the linker flags to be used, used both for C and C++.
 358 #   LIBS the libraries to link to
 359 #   ARFLAGS the archiver flags to be used
 360 #   OBJECT_DIR the directory where we store the object files
 361 #   OUTPUT_DIR the directory where the resulting binary is put
 362 #   INCLUDES only pick source from these directories
 363 #   EXCLUDES do not pick source from these directories
 364 #   INCLUDE_FILES only compile exactly these files!
 365 #   EXCLUDE_FILES with these names
 366 #   EXCLUDE_PATTERN exclude files matching any of these substrings
 367 #   EXTRA_FILES List of extra files not in any of the SRC dirs
 368 #   EXTRA_OBJECT_FILES List of extra object files to include when linking
 369 #   EXTRA_DEPS List of extra dependencies to be added to each compiled file
 370 #   VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
 371 #   RC_FLAGS flags for RC.
 372 #   EMBED_MANIFEST if true, embed manifest on Windows.
 373 #   MAPFILE mapfile
 374 #   REORDER reorder file
 375 #   USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the
 376 #       mapfile for the output symbols file
 377 #   CC the compiler to use, default is $(CC)
 378 #   LD the linker to use, default is $(LD)
 379 #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST, HIGHEST_JVM, SIZE
 380 #   DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
 381 #   DISABLED_WARNINGS_C_<toolchain> Disable the given warnings for the specified toolchain
 382 #       when compiling C code
 383 #   DISABLED_WARNINGS_CXX_<toolchain> Disable the given warnings for the specified
 384 #       toolchain when compiling C++ code
 385 #   STRIP_SYMBOLS Set to false to override global strip policy and always leave
 386 #       symbols in the binary, if the toolchain allows for it
 387 #   DEBUG_SYMBOLS Set to false to disable generation of debug symbols
 388 #   COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying
 389 #   ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol


< prev index next >