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.
5 DEPSDIR:=/usr/i586-mingw32msvc
10 -I"$(DEPSDIR)/boost_1_47_0" \
11 -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
12 -I"$(DEPSDIR)/openssl-1.0.0e/include" \
16 -L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
17 -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
18 -L"$(DEPSDIR)/openssl-1.0.0e"
21 -l boost_system-mt-s \
22 -l boost_filesystem-mt-s \
23 -l boost_program_options-mt-s \
24 -l boost_thread_win32-mt-s \
29 DEFS=-D_MT -DWIN32 -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
31 CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
35 LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
36 LIBS += -l miniupnpc -l iphlpapi
37 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
40 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
42 # TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
43 HEADERS = $(wildcard *.h)
65 obj/%.o: %.cpp $(HEADERS)
66 i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
68 bitcoind.exe: $(OBJS:obj/%=obj/%)
69 i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
72 obj/test/%.o: obj/test/%.cpp $(HEADERS)
73 i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
75 test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
76 i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
85 -rm -f test_bitcoin.exe