Makefile.mingw 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. USE_WIN32_APP=yes
  2. CXX = g++
  3. WINDRES = windres
  4. CXXFLAGS := ${CXX_DEBUG} -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN
  5. NEEDED_CXXFLAGS = -std=c++11
  6. INCFLAGS = -Idaemon -I.
  7. LDFLAGS := ${LD_DEBUG} -Wl,-Bstatic -static-libgcc -static-libstdc++
  8. # Boost libraries suffix
  9. BOOST_SUFFIX = -mt
  10. # UPNP Support
  11. ifeq ($(USE_UPNP),yes)
  12. CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB
  13. LDLIBS = -lminiupnpc
  14. endif
  15. LDLIBS += \
  16. -lboost_system$(BOOST_SUFFIX) \
  17. -lboost_date_time$(BOOST_SUFFIX) \
  18. -lboost_filesystem$(BOOST_SUFFIX) \
  19. -lboost_program_options$(BOOST_SUFFIX) \
  20. -lssl \
  21. -lcrypto \
  22. -lz \
  23. -lwsock32 \
  24. -lws2_32 \
  25. -lgdi32 \
  26. -liphlpapi \
  27. -lstdc++ \
  28. -lpthread
  29. ifeq ($(USE_WIN32_APP), yes)
  30. CXXFLAGS += -DWIN32_APP
  31. LDFLAGS += -mwindows
  32. DAEMON_RC += Win32/Resource.rc
  33. DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
  34. endif
  35. # don't change following line to ifeq ($(USE_AESNI),yes) !!!
  36. ifeq ($(USE_AESNI),1)
  37. CPU_FLAGS += -maes
  38. else
  39. CPU_FLAGS += -msse
  40. endif
  41. ifeq ($(USE_AVX),1)
  42. CPU_FLAGS += -mavx
  43. endif
  44. ifeq ($(USE_ASLR),yes)
  45. LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va -Wl,--dynamicbase,--export-all-symbols
  46. endif
  47. obj/%.o : %.rc
  48. $(WINDRES) -i $< -o $@