Make.defs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ############################################################################
  2. # boards/mips/pic32mx/sure-pic32mx/scripts/Make.defs
  3. #
  4. # Licensed to the Apache Software Foundation (ASF) under one or more
  5. # contributor license agreements. See the NOTICE file distributed with
  6. # this work for additional information regarding copyright ownership. The
  7. # ASF licenses this file to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance with the
  9. # License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  16. # License for the specific language governing permissions and limitations
  17. # under the License.
  18. #
  19. ############################################################################
  20. include $(TOPDIR)/.config
  21. include $(TOPDIR)/tools/Config.mk
  22. include $(TOPDIR)/tools/pic32/Config.mk
  23. include $(TOPDIR)/arch/mips/src/mips32/Toolchain.defs
  24. ifeq ($(CONFIG_MIPS32_TOOLCHAIN_GNU_ELF),y)
  25. LDSCRIPT = mips-release.ld
  26. endif
  27. ifeq ($(CONFIG_MIPS32_TOOLCHAIN_PINGUINOW),y)
  28. LDSCRIPT = mips-release.ld
  29. endif
  30. ifeq ($(CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW),y)
  31. LDSCRIPT = c32-release.ld
  32. endif
  33. ifeq ($(CONFIG_MIPS32_TOOLCHAIN_MICROCHIPW_LITE),y)
  34. LDSCRIPT = c32-release.ld
  35. endif
  36. ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
  37. ARCHSCRIPT = -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
  38. else
  39. ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
  40. endif
  41. ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
  42. ARCHOPTIMIZATION = -g
  43. endif
  44. ifneq ($(CONFIG_DEBUG_NOOPT),y)
  45. ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
  46. endif
  47. ARCHCFLAGS = -fno-builtin
  48. ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new
  49. ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
  50. ARCHWARNINGSXX = -Wall -Wshadow -Wundef
  51. CFLAGS := $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
  52. CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
  53. CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
  54. CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
  55. CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
  56. AFLAGS := $(CFLAGS) -D__ASSEMBLY__
  57. NXFLATLDFLAGS1 = -r -d -warn-common
  58. NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
  59. LDNXFLATFLAGS = -e main -s 2048