Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

makefile.mingw 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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.49.0-mgw" \
  7. -I"C:\db-4.8.30.NC-mgw\build_unix" \
  8. -I"C:\openssl-1.0.0d-mgw\include"
  9. LIBPATHS= \
  10. -L"C:\boost-1.49.0-mgw\stage\lib" \
  11. -L"C:\db-4.8.30.NC-mgw\build_unix" \
  12. -L"C:\openssl-1.0.0d-mgw"
  13. LIBS= \
  14. -l boost_system-mgw45-mt-s-1_49 \
  15. -l boost_filesystem-mgw45-mt-s-1_49 \
  16. -l boost_program_options-mgw45-mt-s-1_49 \
  17. -l boost_thread-mgw45-mt-s-1_49 \
  18. -l db_cxx \
  19. -l ssl \
  20. -l crypto
  21. DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6
  22. DEBUGFLAGS=-g
  23. CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
  24. TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
  25. ifdef USE_UPNP
  26. INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
  27. LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
  28. LIBS += -l miniupnpc -l iphlpapi
  29. DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
  30. endif
  31. 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 mswsock -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/version.o \
  36. obj/checkpoints.o \
  37. obj/netbase.o \
  38. obj/addrman.o \
  39. obj/crypter.o \
  40. obj/key.o \
  41. obj/db.o \
  42. obj/init.o \
  43. obj/irc.o \
  44. obj/keystore.o \
  45. obj/main.o \
  46. obj/net.o \
  47. obj/protocol.o \
  48. obj/bitcoinrpc.o \
  49. obj/rpcdump.o \
  50. obj/rpcnet.o \
  51. obj/rpcrawtransaction.o \
  52. obj/script.o \
  53. obj/sync.o \
  54. obj/util.o \
  55. obj/wallet.o \
  56. obj/walletdb.o \
  57. obj/noui.o
  58. all: bitcoind.exe
  59. obj/%.o: %.cpp $(HEADERS)
  60. g++ -c $(CFLAGS) -o $@ $<
  61. bitcoind.exe: $(OBJS:obj/%=obj/%)
  62. g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  63. TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
  64. obj-test/%.o: test/%.cpp $(HEADERS)
  65. g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<
  66. test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
  67. g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)
  68. clean:
  69. -del /Q bitcoind test_bitcoin
  70. -del /Q obj\*
  71. -del /Q obj-test\*
  72. -del /Q build.h