settings.mk 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Basic Settings
  2. #
  3. SHELL := /bin/bash
  4. TOP_DIR ?= $(CURDIR)
  5. ifeq (Darwin,$(strip $(shell uname)))
  6. SED := gsed
  7. STRIP_DBGOPT :=
  8. else
  9. SED := sed
  10. STRIP_DBGOPT := --strip-dwo
  11. endif
  12. # Settings of input directory and file
  13. #
  14. RULE_DIR ?= $(TOP_DIR)/build-rules
  15. CONFIG_DIR ?= $(TOP_DIR)/configs
  16. PACKAGE_DIR ?= $(TOP_DIR)/packages
  17. IMPORT_DIR ?= $(TOP_DIR)/import
  18. MAKE_SEGMENT ?= iot.mk
  19. DOXYGEN_DIR ?= $(TOP_DIR)
  20. ifeq ($(shell [ ! -d $(CONFIG_DIR) ] && echo y),y)
  21. DEFAULT_BLD := $(RULE_DIR)/misc/config.generic.default
  22. endif
  23. # Settings of project information
  24. PRJ_NAME ?= LITE-build.prj
  25. PRJ_VERSION ?= LITE-build.ver
  26. # Settings of output directory
  27. #
  28. CONFIG_TPL := $(TOP_DIR)/.config
  29. OUTPUT_DIR ?= $(TOP_DIR)/.O
  30. SHADOW_DIR ?= workspace
  31. DIST_DIR ?= $(TOP_DIR)/output
  32. LCOV_DIR ?= Coverage
  33. FINAL_DIR ?= $(DIST_DIR)/release
  34. # Setting of directory for flat modules
  35. #
  36. bindir = /usr/bin
  37. libdir = /usr/lib
  38. incdir = /usr/include
  39. # Setting of build process control
  40. #
  41. COMPILE_LOG := compile.log
  42. WARNING_LOG := warnings.log
  43. HD_MAKEFILE := makefile
  44. TOP_MAKEFILE := makefile
  45. STAMP_PRJ_CFG := $(OUTPUT_DIR)/.just.configured
  46. STAMP_BLD_ENV := $(OUTPUT_DIR)/.sub-build.env
  47. STAMP_BLD_VAR := $(OUTPUT_DIR)/.sub-build.vars
  48. STAMP_LCOV := $(OUTPUT_DIR)/.coverage.done
  49. STAMP_UNPACK := .unpack.done
  50. STAMP_CONFIG := .config.done
  51. STAMP_CMAKE := .cmake_section
  52. STAMP_BUILD := .build.done
  53. STAMP_INSTALL := .install.done
  54. STAMP_POSTINS := .post.install.done
  55. STAMP_SHIELD := .shield.done
  56. STAMP_POST_RULE := $(OUTPUT_DIR)/.post-rules.mk
  57. STAMP_DIR := $(OUTPUT_DIR)/stamps
  58. STAMP_ONE_MK := $(OUTPUT_DIR)/.one_makefile
  59. ifdef DEBUG
  60. AUTO_HEADER_Q :=
  61. ORIGIN_Q :=
  62. SHELL_DBG := set -x;
  63. Q :=
  64. TOP_Q :=
  65. else
  66. Q := @
  67. TOP_Q := @
  68. endif
  69. ifdef DEBUG_SHELL
  70. SHELL_DBG := set -x;
  71. endif
  72. # Setting of downloading toolchains
  73. TOOLCHAIN_DLDIR := $(OUTPUT_DIR)/compiler
  74. # Setting of directory for origin modules
  75. #
  76. export INSTALL_DIR = $(OUTPUT_DIR)/usr
  77. export INSTALL_BIN_DIR = $(INSTALL_DIR)/bin
  78. export INSTALL_LIB_DIR = $(INSTALL_DIR)/lib
  79. # Setting of cmake auto-generation
  80. #
  81. CMAKE_EXPORT_LIBS := \
  82. src/ref-impl/hal \
  83. src/ref-impl/tls \
  84. include $(RULE_DIR)/funcs.mk