You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

makefile.linux-mingw 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # Copyright (c) 2009-2010 Satoshi Nakamoto
  2. # Distributed under the MIT/X11 software license, see the accompanying
  3. # file license.txt or http://www.opensource.org/licenses/mit-license.php.
  4. DEPSDIR:=/usr/i586-mingw32msvc
  5. USE_UPNP:=0
  6. INCLUDEPATHS= \
  7. -I"$(DEPSDIR)/boost_1_47_0" \
  8. -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
  9. -I"$(DEPSDIR)/openssl-1.0.0d/include" \
  10. -I"$(DEPSDIR)/wxWidgets-2.9.2/lib/gcc_lib/mswud" \
  11. -I"$(DEPSDIR)/wxWidgets-2.9.2/include" \
  12. -I"$(DEPSDIR)/wxWidgets-2.9.2/lib/wx/include/i586-mingw32msvc-msw-unicode-static-2.9/" \
  13. -I"$(DEPSDIR)"
  14. LIBPATHS= \
  15. -L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
  16. -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
  17. -L"$(DEPSDIR)/openssl-1.0.0d" \
  18. -L"$(DEPSDIR)/wxWidgets-2.9.2/lib"
  19. WXLIBS= -l wx_mswu-2.9-i586-mingw32msvc
  20. LIBS= \
  21. -l boost_system-mt-s \
  22. -l boost_filesystem-mt-s \
  23. -l boost_program_options-mt-s \
  24. -l boost_thread_win32-mt-s \
  25. -l db_cxx \
  26. -l ssl \
  27. -l crypto
  28. DEFS=-D_MT -DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
  29. DEBUGFLAGS=-g -D__WXDEBUG__
  30. CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
  31. HEADERS = \
  32. base58.h \
  33. bignum.h \
  34. crypter.h \
  35. db.h \
  36. headers.h \
  37. init.h \
  38. irc.h \
  39. key.h \
  40. keystore.h \
  41. main.h \
  42. net.h \
  43. noui.h \
  44. protocol.h \
  45. bitcoinrpc.h \
  46. script.h \
  47. serialize.h \
  48. strlcpy.h \
  49. ui.h \
  50. uibase.h \
  51. uint256.h \
  52. util.h \
  53. wallet.h
  54. ifdef USE_UPNP
  55. LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
  56. LIBS += -l miniupnpc -l iphlpapi
  57. DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
  58. endif
  59. LIBS += -l mingwthrd -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
  60. OBJS= \
  61. obj/crypter.o \
  62. obj/db.o \
  63. obj/init.o \
  64. obj/irc.o \
  65. obj/keystore.o \
  66. obj/main.o \
  67. obj/net.o \
  68. obj/protocol.o \
  69. obj/bitcoinrpc.o \
  70. obj/script.o \
  71. obj/util.o \
  72. obj/wallet.o \
  73. cryptopp/obj/sha.o \
  74. cryptopp/obj/cpu.o
  75. all: bitcoin.exe
  76. obj/%.o: %.cpp $(HEADERS)
  77. i586-mingw32msvc-g++ -c $(CFLAGS) -DGUI -o $@ $<
  78. cryptopp/obj/%.o: cryptopp/%.cpp
  79. i586-mingw32msvc-g++ -c $(CFLAGS) -O3 -DCRYPTOPP_DISABLE_ASM -o $@ $<
  80. obj/ui_res.o: ../share/ui.rc ../share/pixmaps/bitcoin.ico ../share/pixmaps/check.ico ../share/pixmaps/send16.bmp ../share/pixmaps/send16mask.bmp ../share/pixmaps/send16masknoshadow.bmp ../share/pixmaps/send20.bmp ../share/pixmaps/send20mask.bmp ../share/pixmaps/addressbook16.bmp ../share/pixmaps/addressbook16mask.bmp ../share/pixmaps/addressbook20.bmp ../share/pixmaps/addressbook20mask.bmp
  81. i586-mingw32msvc-windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $<
  82. bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o
  83. i586-mingw32msvc-g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
  84. obj/nogui/%.o: %.cpp $(HEADERS)
  85. i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
  86. bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
  87. i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  88. obj/test/%.o: obj/test/%.cpp $(HEADERS)
  89. i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
  90. test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
  91. i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
  92. clean:
  93. -rm -f obj/*.o
  94. -rm -f obj/nogui/*.o
  95. -rm -f obj/test/*.o
  96. -rm -f cryptopp/obj/*.o
  97. -rm -f test/*.o
  98. -rm -f headers.h.gch
  99. -rm -f bitcoin.exe
  100. -rm -f bitcoind.exe
  101. -rm -f test_bitcoin.exe