1
0

config-mingw-w64.mk 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ifeq ($(WINDOWS_ARCH),)
  2. MINGW_ARCH = i686
  3. else ifeq ($(WINDOWS_ARCH),x86)
  4. MINGW_ARCH = i686
  5. else ifeq ($(WINDOWS_ARCH),amd64)
  6. MINGW_ARCH = x86_64
  7. #else ifeq ($(WINDOWS_ARCH),arm)
  8. #MINGW_ARCH =
  9. #else ifeq ($(WINDOWS_ARCH),arm64)
  10. #MINGW_ARCH =
  11. else
  12. $(error unknown WINDOWS_ARCH)
  13. endif
  14. CC = $(MINGW_ARCH)-w64-mingw32-gcc$(MINGW_FLAVOUR)
  15. CXX = $(MINGW_ARCH)-w64-mingw32-g++$(MINGW_FLAVOUR)
  16. LD = $(MINGW_ARCH)-w64-mingw32-g++$(MINGW_FLAVOUR)
  17. AR = $(MINGW_ARCH)-w64-mingw32-ar$(MINGW_FLAVOUR)
  18. CXXFLAGS_STDCXX = -std=c++17 -fexceptions -frtti
  19. CFLAGS_STDC = -std=c99
  20. CXXFLAGS += $(CXXFLAGS_STDCXX)
  21. CFLAGS += $(CFLAGS_STDC)
  22. CPPFLAGS +=
  23. CXXFLAGS += -municode -mconsole -mthreads
  24. CFLAGS += -municode -mconsole -mthreads
  25. LDFLAGS +=
  26. LDLIBS += -lm -lole32 -lrpcrt4 -lwinmm
  27. ARFLAGS := rcs
  28. PC_LIBS_PRIVATE += -lole32 -lrpcrt4
  29. ifeq ($(WINDOWS_FAMILY),)
  30. # nothing
  31. else ifeq ($(WINDOWS_FAMILY),desktop-app)
  32. # nothing
  33. else ifeq ($(WINDOWS_FAMILY),app)
  34. CPPFLAGS += -DWINAPI_FAMILY=2
  35. OPENMPT123=0
  36. else ifeq ($(WINDOWS_FAMILY),phone-app)
  37. CPPFLAGS += -DWINAPI_FAMILY=3
  38. OPENMPT123=0
  39. else ifeq ($(WINDOWS_FAMILY),pc-app)
  40. CPPFLAGS += -DWINAPI_FAMILY=2
  41. OPENMPT123=0
  42. else
  43. $(error unknown WINDOWS_FAMILY)
  44. endif
  45. ifeq ($(WINDOWS_VERSION),)
  46. # nothing
  47. else ifeq ($(WINDOWS_VERSION),win95)
  48. CPPFLAGS += -D_WIN32_WINDOWS=0x0400
  49. else ifeq ($(WINDOWS_VERSION),win98)
  50. CPPFLAGS += -D_WIN32_WINDOWS=0x0410
  51. else ifeq ($(WINDOWS_VERSION),winme)
  52. CPPFLAGS += -D_WIN32_WINDOWS=0x0490
  53. else ifeq ($(WINDOWS_VERSION),winnt4)
  54. CPPFLAGS += -D_WIN32_WINNT=0x0400
  55. else ifeq ($(WINDOWS_VERSION),win2000)
  56. CPPFLAGS += -D_WIN32_WINNT=0x0500
  57. else ifeq ($(WINDOWS_VERSION),winxp)
  58. CPPFLAGS += -D_WIN32_WINNT=0x0501
  59. else ifeq ($(WINDOWS_VERSION),winxp64)
  60. CPPFLAGS += -D_WIN32_WINNT=0x0502
  61. else ifeq ($(WINDOWS_VERSION),winvista)
  62. CPPFLAGS += -DNTDDI_VERSION=0x06000000
  63. else ifeq ($(WINDOWS_VERSION),win7)
  64. CPPFLAGS += -DNTDDI_VERSION=0x06010000
  65. else ifeq ($(WINDOWS_VERSION),win8)
  66. CPPFLAGS += -DNTDDI_VERSION=0x06020000
  67. else ifeq ($(WINDOWS_VERSION),win8.1)
  68. CPPFLAGS += -DNTDDI_VERSION=0x06030000
  69. else ifeq ($(WINDOWS_VERSION),win10)
  70. CPPFLAGS += -DNTDDI_VERSION=0x0A000000
  71. else
  72. $(error unknown WINDOWS_VERSION)
  73. endif
  74. ifeq ($(MINGW_COMPILER),clang)
  75. include build/make/warnings-clang.mk
  76. else
  77. include build/make/warnings-gcc.mk
  78. endif
  79. EXESUFFIX=.exe
  80. SOSUFFIX=.dll
  81. SOSUFFIXWINDOWS=1
  82. DYNLINK=0
  83. SHARED_LIB=1
  84. STATIC_LIB=0
  85. SHARED_SONAME=0
  86. ifeq ($(HOST_FLAVOUR),MSYS2)
  87. else
  88. IS_CROSS=1
  89. NO_ZLIB=1
  90. NO_LTDL=1
  91. NO_DL=1
  92. NO_MPG123=1
  93. NO_OGG=1
  94. NO_VORBIS=1
  95. NO_VORBISFILE=1
  96. NO_PORTAUDIO=1
  97. NO_PORTAUDIOCPP=1
  98. NO_PULSEAUDIO=1
  99. NO_SDL=1
  100. NO_SDL2=1
  101. NO_SNDFILE=1
  102. NO_FLAC=1
  103. endif