Makefile.base 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. NUCLEI_SDK_BUILD = $(NUCLEI_SDK_ROOT)/Build
  2. # Include your local and global makefile variables
  3. # SOC, DOWNLOAD, STDCLIB etc.
  4. # Makefile.global should be placed in $(NUCLEI_SDK_ROOT)/Build
  5. # Makefile.local should be placed together with application Makefile in your own application folder
  6. # Sample content for this Makefile.local or Makefile.global
  7. # SOC ?= demosoc
  8. # DOWNLOAD ?= ilm
  9. EXTRA_MKS := $(wildcard Makefile.local $(NUCLEI_SDK_BUILD)/Makefile.global)
  10. ifneq ("$(strip $(EXTRA_MKS))", "")
  11. $(info Obtaining addtional make variables from $(realpath $(EXTRA_MKS)))
  12. include $(EXTRA_MKS)
  13. endif
  14. # Variables could be passed in make command
  15. # NOTE: CORE and BOARD are defined in $(NUCLEI_SDK_ROOT)/SoC/$(SOC)/Makefile.build
  16. # BOARD and SOC name should always be lower-case
  17. ## Available choices:
  18. ## The name of sub directories in $(NUCLEI_SDK_ROOT)/SoC/
  19. SOC ?= demosoc
  20. ## Available choices:
  21. ## ilm: Program will be download into ilm/ram and run directly in ilm/ram, program lost when poweroff
  22. ## flash: Program will be download into flash, when running, program will be copied to ilm/ram and run in ilm/ram
  23. ## flashxip: Program will to be download into flash and run directly in Flash
  24. DOWNLOAD ?= ilm
  25. ## If SIMULATION=1, it means the program is optimized for hardware simulation environment
  26. SIMULATION ?= 0
  27. ## If V=1, it will display compiling message in verbose including compiling options
  28. V ?=
  29. ## If SILENT=1, it will not display any compiling messsage
  30. SILENT ?=
  31. # Variables should be defined in Application Makefile
  32. ## Available choices:
  33. ## The name of sub directories in $(NUCLEI_SDK_ROOT)/OS/
  34. RTOS ?=
  35. ## Available choices:
  36. ##### Using newlib
  37. ### newlib_full: Normal newlib library with full newlib feature, to replace NEWLIB!=nano
  38. ### newlib_fast: Newlib-nano library with printf and scanf float feature
  39. ### newlib_small: Newlib-nano library with printf float feature, to replace NEWLIB=nano PFLOAT=1
  40. ### newlib_nano: Newlib-nano library without float printf/scanf feature, to replace NEWLIB=nano PFLOAT=0
  41. ##### Using Nuclei C Runtime library
  42. ### libncrt_fast: Nuclei C Runtime library, favor speed at the expense of size
  43. ### libncrt_balanced: balanced, full feature
  44. ### libncrt_small: favor size at the expense of speed, but full feature
  45. ### libncrt_nano: favor size at the expense of speed, no float support
  46. ### libncrt_pico: favor size at the expense of speed, no long/long long support
  47. ##### Using without system library or include
  48. ### nostd: Don't search the standard system directories for header files
  49. ### nospec: Don't pass any --specs options
  50. STDCLIB ?= newlib_nano
  51. ## If NOGC=1, it will not gc any sections during compiling to save code size
  52. NOGC ?=
  53. ## If BANNER=0, it will not display sdk banner when program run
  54. BANNER ?=
  55. # Directory variables for NMSIS, SoC/RTOS chosen, Middleware Components
  56. # NUCLEI_SDK_SOC and NUCLEI_SDK_RTOS variables need to be set deferred
  57. NUCLEI_SDK_NMSIS ?= $(NUCLEI_SDK_ROOT)/NMSIS
  58. NUCLEI_SDK_SOC = $(NUCLEI_SDK_ROOT)/SoC/$(SOC)
  59. NUCLEI_SDK_RTOS = $(NUCLEI_SDK_ROOT)/OS/$(RTOS)
  60. NUCLEI_SDK_MIDDLEWARE := $(NUCLEI_SDK_ROOT)/Components
  61. ## Include GNU Make Standard Library
  62. ## Website: http://gmsl.sourceforge.net/
  63. include $(NUCLEI_SDK_BUILD)/gmsl/gmsl
  64. include $(NUCLEI_SDK_BUILD)/Makefile.misc
  65. include $(NUCLEI_SDK_BUILD)/Makefile.conf
  66. include $(NUCLEI_SDK_BUILD)/Makefile.rules