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.mingw 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. USE_UPNP:=0
  5. INCLUDEPATHS= \
  6. -I"C:\boost-1.43.0-mgw" \
  7. -I"C:\db-4.7.25.NC-mgw\build_unix" \
  8. -I"C:\openssl-1.0.0d-mgw\include" \
  9. -I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \
  10. -I"C:\wxWidgets-2.9.1-mgw\include"
  11. LIBPATHS= \
  12. -L"C:\boost-1.43.0-mgw\stage\lib" \
  13. -L"C:\db-4.7.25.NC-mgw\build_unix" \
  14. -L"C:\openssl-1.0.0d-mgw" \
  15. -L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib"
  16. WXLIBS= \
  17. -l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd
  18. LIBS= \
  19. -l boost_system-mgw45-mt-s-1_43 \
  20. -l boost_filesystem-mgw45-mt-s-1_43 \
  21. -l boost_program_options-mgw45-mt-s-1_43 \
  22. -l boost_thread-mgw45-mt-s-1_43 \
  23. -l db_cxx \
  24. -l ssl \
  25. -l crypto
  26. DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL
  27. DEBUGFLAGS=-g -D__WXDEBUG__
  28. CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
  29. HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
  30. script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
  31. ifdef USE_UPNP
  32. INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
  33. LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
  34. LIBS += -l miniupnpc -l iphlpapi
  35. DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
  36. endif
  37. LIBS += -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
  38. OBJS= \
  39. obj/util.o \
  40. obj/script.o \
  41. obj/db.o \
  42. obj/net.o \
  43. obj/irc.o \
  44. obj/keystore.o \
  45. obj/main.o \
  46. obj/wallet.o \
  47. obj/rpc.o \
  48. obj/init.o \
  49. cryptopp/obj/sha.o \
  50. cryptopp/obj/cpu.o
  51. all: bitcoin.exe
  52. obj/%.o: %.cpp $(HEADERS)
  53. g++ -c $(CFLAGS) -DGUI -o $@ $<
  54. cryptopp/obj/%.o: cryptopp/%.cpp
  55. g++ -c $(CFLAGS) -O3 -DCRYPTOPP_X86_ASM_AVAILABLE -o $@ $<
  56. 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
  57. windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $<
  58. bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o
  59. g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
  60. obj/nogui/%.o: %.cpp $(HEADERS)
  61. g++ -c $(CFLAGS) -o $@ $<
  62. bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
  63. g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  64. obj/test/%.o: obj/test/%.cpp $(HEADERS)
  65. g++ -c $(CFLAGS) -o $@ $<
  66. test_bitcoin: obj/test/test_bitcoin.o
  67. g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  68. clean:
  69. -del /Q bitcoin bitcoind test_bitcoin
  70. -del /Q obj\*
  71. -del /Q obj\nogui\*
  72. -del /Q obj\test\*
  73. -del /Q cryptopp\obj\*
  74. -del /Q test\*.o
  75. -del /Q headers.h.gch