Makefile.configs 724 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. MAKEFILE_CONFIGS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
  2. ifeq ($(origin CC),default)
  3. CC = gcc
  4. endif
  5. ifeq ($(origin AS),default)
  6. AS = gcc
  7. endif
  8. ifeq ($(origin AR),default)
  9. AR = ar
  10. endif
  11. ifeq ($(origin ARFLAGS),default)
  12. ARFLAGS = rcs
  13. endif
  14. ifeq ($(origin LD),default)
  15. LD = ld
  16. endif
  17. ifeq ($(origin CXX),default)
  18. CXX = g++
  19. endif
  20. OBJCOPY ?= objcopy
  21. SYS ?= $(shell $(CC) -dumpmachine)
  22. export SYS
  23. DEBUG ?=
  24. export DEBUG
  25. ifeq ($(DEBUG),1)
  26. CFLAGS += -gdwarf-2 -g3
  27. CXXFLAGS += -gdwarf-2 -g3
  28. CFLAGS += -DDEBUG
  29. ASFLAGS += -DDEBUG
  30. endif
  31. ifeq ($(WERROR),1)
  32. CFLAGS += -Werror
  33. CXXFLAGS += -Werror
  34. endif
  35. ifeq ($(PROFILING),1)
  36. CFLAGS += -DPROFILING=1
  37. endif
  38. MAKEFILE_CONFIGS_INCLUDED = y
  39. include $(MAKEFILE_CONFIGS_DIR)/Makefile.Host