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.
5 DEPSDIR:=/usr/i586-mingw32msvc
10 -I"$(DEPSDIR)/boost_1_49_0" \
11 -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
12 -I"$(DEPSDIR)/openssl-1.0.1b/include" \
17 -L"$(DEPSDIR)/boost_1_49_0/stage/lib" \
18 -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
19 -L"$(DEPSDIR)/openssl-1.0.1b"
22 -l boost_system-mt-s \
23 -l boost_filesystem-mt-s \
24 -l boost_program_options-mt-s \
25 -l boost_thread_win32-mt-s \
30 DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6
32 CFLAGS=-O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
34 TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
37 LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
38 LIBS += -l miniupnpc -l iphlpapi
39 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
42 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 mswsock -l shlwapi
44 # TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
45 HEADERS = $(wildcard *.h)
64 obj/rpcrawtransaction.o \
75 /bin/sh ../share/genbuild.sh obj/build.h
76 version.cpp: obj/build.h
77 DEFS += -DHAVE_BUILD_INFO
79 obj/%.o: %.cpp $(HEADERS)
80 i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
82 bitcoind.exe: $(OBJS:obj/%=obj/%)
83 i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
85 TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
87 obj-test/%.o: test/%.cpp $(HEADERS)
88 i586-mingw32msvc-g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<
90 test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
91 i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)
98 -rm -f test_bitcoin.exe