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

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