Advertisement
Guest User

Untitled

a guest
Dec 1st, 2014
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 3.07 KB | None | 0 0
  1. # Copyright (c) 2009-2010 Satoshi Nakamoto
  2. # Distributed under the MIT/X11 software license, see the accompanying
  3. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4.  
  5. USE_UPNP:=0
  6. USE_IPV6:=0
  7.  
  8. INCLUDEPATHS= \
  9.  -I"/c/deps/boost_1_57_0" \
  10.  -I"/c/deps/db-4.8.30.NC/build_unix" \
  11.  -I"/c/deps/openssl-1.0.1j/include"
  12.  
  13. LIBPATHS= \
  14.   -L"/c/deps/boost_1_57_0/stage/lib" \
  15.  -L"/c/deps/db-4.8.30.NC/build_unix" \
  16.  -L"/c/deps/openssl-1.0.1j"
  17.  
  18. LIBS= \
  19.  -l boost_system-mgw49-mt-s-1_57 \
  20.  -l boost_filesystem-mgw49-mt-s-1_57 \
  21.  -l boost_program_options-mgw49-mt-s-1_57 \
  22.  -l boost_thread-mgw49-mt-s-1_57 \
  23.  -l boost_chrono-mgw49-mt-s-1_57 \
  24.  -l db_cxx \
  25.  -l ssl \
  26.  -l crypto
  27.  
  28. DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D__NO_SYSTEM_INCLUDES
  29. DEBUGFLAGS=-g
  30. CFLAGS=-mthreads -O2 -msse2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
  31. LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat
  32.  
  33. TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
  34.  
  35. ifndef USE_UPNP
  36.     override USE_UPNP = -
  37. endif
  38. ifneq (${USE_UPNP}, -)
  39.  INCLUDEPATHS += -I"/c/deps"
  40.  LIBPATHS += -L"/c/deps/miniupnpc"
  41.  LIBS += -l miniupnpc -l iphlpapi
  42.  DEFS += -DMINIUPNP_STATICLIB -DUSE_UPNP=$(USE_UPNP)
  43. endif
  44.  
  45. ifneq (${USE_IPV6}, -)
  46.     DEFS += -DUSE_IPV6=$(USE_IPV6)
  47. endif
  48.  
  49. 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
  50.  
  51. # TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
  52. HEADERS = $(wildcard *.h)
  53.  
  54. OBJS= \
  55.     obj/alert.o \
  56.     obj/version.o \
  57.     obj/checkpoints.o \
  58.     obj/netbase.o \
  59.     obj/addrman.o \
  60.     obj/crypter.o \
  61.     obj/key.o \
  62.     obj/db.o \
  63.     obj/init.o \
  64.     obj/irc.o \
  65.     obj/keystore.o \
  66.     obj/main.o \
  67.     obj/net.o \
  68.     obj/protocol.o \
  69.     obj/bitcoinrpc.o \
  70.     obj/rpcdump.o \
  71.     obj/rpcnet.o \
  72.     obj/rpcmining.o \
  73.     obj/rpcwallet.o \
  74.     obj/rpcblockchain.o \
  75.     obj/rpcrawtransaction.o \
  76.     obj/script.o \
  77.     obj/sync.o \
  78.     obj/util.o \
  79.     obj/wallet.o \
  80.     obj/walletdb.o \
  81.     obj/noui.o \
  82.     obj/kernel.o \
  83.     obj/pbkdf2.o \
  84.     obj/scrypt_mine.o \
  85.     obj/scrypt-x86.o \
  86.     obj/scrypt-x86_64.o
  87.  
  88.  
  89. all: dogecoindarkd.exe
  90.  
  91. test check: test_dogecoindark.exe FORCE
  92.     test_dogecoindark.exe
  93.  
  94. obj/%.o: %.cpp $(HEADERS)
  95.     g++ -c $(CFLAGS) -o $@ $<
  96.  
  97. obj/scrypt-x86.o: scrypt-x86.S
  98.     g++ -c $(CFLAGS) -MMD -o $@ $<
  99.  
  100. obj/scrypt-x86_64.o: scrypt-x86_64.S
  101.     g++ -c $(CFLAGS) -MMD -o $@ $<
  102.  
  103. dogecoindarkd.exe: $(OBJS:obj/%=obj/%)
  104.     g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  105.  
  106. TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
  107.  
  108. obj-test/%.o: test/%.cpp $(HEADERS)
  109.     g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<
  110.  
  111. test_dogecoindark.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
  112.     g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)
  113.  
  114. clean:
  115.     -del /Q dogecoindark test_dogecoindark
  116.     -del /Q obj\*
  117.     -del /Q obj-test\*
  118.  
  119. FORCE:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement