meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| buildroot:variables [2017/02/22 11:21] – niziak | buildroot:variables [2024/01/02 16:41] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Auto override | + | ====== Variables ====== |
| + | ==== Auto override ==== | ||
| + | <code make> | ||
| # Create an automatic OVERRIDE for everything under src/ | # Create an automatic OVERRIDE for everything under src/ | ||
| AUTO_OVERRIDES = $(notdir $(wildcard $(BR2_EXTERNAL)/ | AUTO_OVERRIDES = $(notdir $(wildcard $(BR2_EXTERNAL)/ | ||
| Line 7: | Line 9: | ||
| $(eval $(call do_override, | $(eval $(call do_override, | ||
| + | #(this snippet is licensed GPLv2+). | ||
| + | #by Arnout Vandecappelle (Essensium/ | ||
| + | </ | ||
| + | |||
| + | ==== Variables ==== | ||
| + | | **$(@D)** | which contains the directory in which the package source code has been uncompressed. | | ||
| + | | **$(FOO_DIR)** | same as **$(@D)** | | ||
| + | | **$(FOO_PKGDIR)** | contains the path to the directory containing the foo.mk and Config.in files.| | ||
| + | | **$(HOST_DIR)** | | | ||
| + | | **$(STAGING_DIR)** | | | ||
| + | | **$(TARGET_DIR)** | | | ||
| - | (this snippet is licensed GPLv2+). | ||
| - | by Arnout Vandecappelle (Essensium/ | ||
| ==== Cross compilation ==== | ==== Cross compilation ==== | ||
| Variables are defined in // | Variables are defined in // | ||
| - | * $(TARGET_CC) | ||
| - | * $(TARGET_AR) $(TARGET_AS) $(TARGET_CPP) $(TARGET_CXX) _FC _LD _NM _RANLIB _READELF _OBJCOPY _OBJDUMP | ||
| - | * $(TARGET_CC_NOCCACHE) | ||
| - | * $(TARGET_CXX_NOCCACHE) | ||
| - | | + | | **$(TARGET_CC)** | cross compiler gcc binary |
| - | * $(TARGEt_CPPFLAGS) | + | | **$(TARGET_AR) | |
| - | * $(TARGET_CXXFLAGS) | + | | $(TARGET_AS) | |
| - | * $(TARGET_LDFLAGS) | + | | $(TARGET_CPP) | |
| + | | $(TARGET_CXX) | | ||
| + | | _FC _LD _NM | _RANLIB | _READELF | _OBJCOPY | | ||
| + | | _OBJDUMP** | | ||
| + | | **$(TARGET_CC_NOCCACHE)** | | ||
| + | | **$(TARGET_CXX_NOCCACHE)** | | ||
| - | | + | | **$(TARGET_CFLAGS)** | (i.e: TARGET_CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 |
| - | | + | | **$(TARGET_CPPFLAGS)** | |
| - | | + | | **$(TARGET_CXXFLAGS)** | |
| + | | **$(TARGET_LDFLAGS)** | | ||
| + | |||
| + | | **$(TARGET_MAKE_ENV)** | env which has to be set for cross compilation. | ||
| + | It overrides search path, to get cross compiler first. (i.e: | ||
| + | | $(TARGET_DIR) | ||
| + | | $(STAGING_DIR) | ||
| Additional variables (not needed in normal use) | Additional variables (not needed in normal use) | ||
| - | | + | | **$(CCACHE)** | full path to ccache binary or empty (i.e: CCACHE=/ |
| - | * $(TARGET_CROSS) | + | | **$(TARGET_CROSS)** | prefix with full path to cross compiler (i.e: TARGET_CROSS=/ |
| - | * $(ABI) | + | | **$(ABI)** | gnueabi[hf] eabi[hf] |
| - | * $(GNU_TARGET_NAME) GNU_TARGET_NAME=arm-buildroot-linux-uclibcgnueabi | + | | **$(GNU_TARGET_NAME)** | GNU_TARGET_NAME=arm-buildroot-linux-uclibcgnueabi |
| === Example === | === Example === | ||