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 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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.0e/include" \
  10. -I"$(DEPSDIR)"
  11. LIBPATHS= \
  12. -L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
  13. -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
  14. -L"$(DEPSDIR)/openssl-1.0.0e"
  15. LIBS= \
  16. -l boost_system-mt-s \
  17. -l boost_filesystem-mt-s \
  18. -l boost_program_options-mt-s \
  19. -l boost_thread_win32-mt-s \
  20. -l db_cxx \
  21. -l ssl \
  22. -l crypto
  23. DEFS=-D_MT -DWIN32 -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
  24. DEBUGFLAGS=-g
  25. CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
  26. ifdef USE_UPNP
  27. LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
  28. LIBS += -l miniupnpc -l iphlpapi
  29. DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
  30. endif
  31. 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
  32. # TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
  33. HEADERS = $(wildcard *.h)
  34. OBJS= \
  35. obj/checkpoints.o \
  36. obj/netbase.o \
  37. obj/crypter.o \
  38. obj/key.o \
  39. obj/db.o \
  40. obj/init.o \
  41. obj/irc.o \
  42. obj/keystore.o \
  43. obj/main.o \
  44. obj/net.o \
  45. obj/protocol.o \
  46. obj/bitcoinrpc.o \
  47. obj/rpcdump.o \
  48. obj/script.o \
  49. obj/util.o \
  50. obj/wallet.o
  51. all: bitcoind.exe
  52. obj/%.o: %.cpp $(HEADERS)
  53. i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
  54. bitcoind.exe: $(OBJS:obj/%=obj/%)
  55. i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  56. obj/test/%.o: obj/test/%.cpp $(HEADERS)
  57. i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
  58. test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
  59. i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
  60. clean:
  61. -rm -f obj/*.o
  62. -rm -f obj/test/*.o
  63. -rm -f test/*.o
  64. -rm -f headers.h.gch
  65. -rm -f bitcoind.exe
  66. -rm -f test_bitcoin.exe