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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
  32. script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h \
  33. crypter.h init.h
  34. ifdef USE_UPNP
  35. LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
  36. LIBS += -l miniupnpc -l iphlpapi
  37. DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
  38. endif
  39. 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
  40. OBJS= \
  41. obj/util.o \
  42. obj/script.o \
  43. obj/db.o \
  44. obj/net.o \
  45. obj/irc.o \
  46. obj/keystore.o \
  47. obj/main.o \
  48. obj/wallet.o \
  49. obj/rpc.o \
  50. obj/init.o \
  51. obj/crypter.o \
  52. cryptopp/obj/sha.o \
  53. cryptopp/obj/cpu.o
  54. all: bitcoin.exe
  55. obj/%.o: %.cpp $(HEADERS)
  56. i586-mingw32msvc-g++ -c $(CFLAGS) -DGUI -o $@ $<
  57. cryptopp/obj/%.o: cryptopp/%.cpp
  58. i586-mingw32msvc-g++ -c $(CFLAGS) -O3 -DCRYPTOPP_DISABLE_ASM -o $@ $<
  59. 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
  60. i586-mingw32msvc-windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $<
  61. bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o
  62. i586-mingw32msvc-g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
  63. obj/nogui/%.o: %.cpp $(HEADERS)
  64. i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
  65. bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
  66. i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  67. obj/test/%.o: obj/test/%.cpp $(HEADERS)
  68. i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
  69. test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
  70. i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
  71. clean:
  72. -rm -f obj/*.o
  73. -rm -f obj/nogui/*.o
  74. -rm -f obj/test/*.o
  75. -rm -f cryptopp/obj/*.o
  76. -rm -f test/*.o
  77. -rm -f headers.h.gch
  78. -rm -f bitcoin.exe
  79. -rm -f bitcoind.exe
  80. -rm -f test_bitcoin.exe