Makefile_win32 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. ##############################################################################
  2. # Build global options
  3. # NOTE: Can be overridden externally.
  4. #
  5. # Compiler options here.
  6. ifeq ($(USE_OPT),)
  7. USE_OPT = $(XOPT) -m32
  8. endif
  9. # C specific options here (added to USE_OPT).
  10. ifeq ($(USE_COPT),)
  11. USE_COPT =
  12. endif
  13. # C++ specific options here (added to USE_OPT).
  14. ifeq ($(USE_CPPOPT),)
  15. USE_CPPOPT = -fno-rtti
  16. endif
  17. # Enable this if you want the linker to remove unused code and data.
  18. ifeq ($(USE_LINK_GC),)
  19. USE_LINK_GC = yes
  20. endif
  21. # Linker extra options here.
  22. ifeq ($(USE_LDOPT),)
  23. USE_LDOPT =
  24. endif
  25. # Enable this if you want link time optimizations (LTO).
  26. ifeq ($(USE_LTO),)
  27. USE_LTO = no
  28. endif
  29. # Enable this if you want to see the full log while compiling.
  30. ifeq ($(USE_VERBOSE_COMPILE),)
  31. USE_VERBOSE_COMPILE = no
  32. endif
  33. # If enabled, this option makes the build process faster by not compiling
  34. # modules not used in the current configuration.
  35. ifeq ($(USE_SMART_BUILD),)
  36. USE_SMART_BUILD = no
  37. endif
  38. #
  39. # Build global options
  40. ##############################################################################
  41. ##############################################################################
  42. # Architecture or project specific options
  43. #
  44. #
  45. # Architecture or project specific options
  46. ##############################################################################
  47. ##############################################################################
  48. # Project, sources and paths
  49. #
  50. # Define project name here
  51. PROJECT = ch.exe
  52. # Imported source files and paths
  53. CHIBIOS = ../../..
  54. CONFDIR := ./cfg
  55. BUILDDIR := ./build
  56. DEPDIR := ./.dep
  57. # Licensing files.
  58. include $(CHIBIOS)/os/license/license.mk
  59. # Startup files.
  60. # HAL-OSAL files (optional).
  61. include $(CHIBIOS)/os/hal/hal.mk
  62. include $(CHIBIOS)/os/hal/boards/simulator/board.mk
  63. include $(CHIBIOS)/os/hal/ports/simulator/win32/platform.mk
  64. include $(CHIBIOS)/os/hal/osal/rt/osal.mk
  65. # RTOS files (optional).
  66. include $(CHIBIOS)/os/rt/rt.mk
  67. include $(CHIBIOS)/os/common/ports/SIMIA32/compilers/GCC/port.mk
  68. # Other files (optional).
  69. include $(CHIBIOS)/test/lib/test.mk
  70. include $(CHIBIOS)/test/rt/rt_test.mk
  71. include $(CHIBIOS)/test/oslib/oslib_test.mk
  72. #include $(CHIBIOS)/os/hal/lib/streams/streams.mk
  73. #include $(CHIBIOS)/os/various/shell/shell.mk
  74. # C sources here.
  75. CSRC = $(ALLCSRC) \
  76. $(TESTSRC) \
  77. main.c
  78. # C++ sources here.
  79. CPPSRC = $(ALLCPPSRC)
  80. # List ASM source files here.
  81. ASMSRC = $(ALLASMSRC)
  82. ASMXSRC = $(ALLXASMSRC)
  83. INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
  84. # GCOV files.
  85. GCOVSRC = $(KERNSRC)
  86. #
  87. # Project, sources and paths
  88. ##############################################################################
  89. ##############################################################################
  90. # Start of user section
  91. #
  92. # List all user C define here, like -D_DEBUG=1
  93. UDEFS = -DSIMULATOR
  94. # Define ASM defines here
  95. UADEFS =
  96. # List all user directories here
  97. UINCDIR =
  98. # List the user directory to look for the libraries here
  99. ULIBDIR =
  100. # List all user libraries here
  101. ULIBS =
  102. #
  103. # End of user defines
  104. ##############################################################################
  105. ##############################################################################
  106. # Compiler settings
  107. #
  108. TRGT =
  109. CC = $(TRGT)gcc
  110. CPPC = $(TRGT)g++
  111. # Enable loading with g++ only if you need C++ runtime support.
  112. # NOTE: You can use C++ even without C++ support if you are careful. C++
  113. # runtime support makes code size explode.
  114. LD = $(TRGT)gcc
  115. #LD = $(TRGT)g++
  116. CP = $(TRGT)objcopy
  117. AS = $(TRGT)gcc -x assembler-with-cpp
  118. AR = $(TRGT)ar
  119. OD = $(TRGT)objdump
  120. SZ = $(TRGT)size
  121. HEX = $(CP) -O ihex
  122. BIN = $(CP) -O binary
  123. COV = gcov
  124. # Define C warning options here
  125. CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
  126. # Define C++ warning options here
  127. CPPWARN = -Wall -Wextra -Wundef
  128. #
  129. # Compiler settings
  130. ##############################################################################
  131. RULESPATH = $(CHIBIOS)/os/common/startup/SIMIA32/compilers/GCC
  132. include $(RULESPATH)/rules.mk
  133. misra:
  134. @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(KERNSRC)