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.
9 -I"C:\boost-1.50.0-mgw" \
10 -I"C:\db-4.8.30.NC-mgw\build_unix" \
11 -I"C:\openssl-1.0.1c-mgw\include"
14 -L"C:\boost-1.50.0-mgw\stage\lib" \
15 -L"C:\db-4.8.30.NC-mgw\build_unix" \
16 -L"C:\openssl-1.0.1c-mgw"
19 -l boost_system-mgw44-mt-1_53 \
20 -l boost_filesystem-mgw44-mt-1_53 \
21 -l boost_program_options-mgw44-mt-1_53 \
22 -l boost_thread-mgw44-mt-1_53 \
23 -l boost_chrono-mgw44-mt-1_53 \
28 DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE
30 CFLAGS=-mthreads -O2 -msse2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
31 LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat
33 TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
38 ifneq (${USE_UPNP}, -)
39 INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
40 LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
41 LIBS += -l miniupnpc -l iphlpapi
42 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
45 ifneq (${USE_IPV6}, -)
46 DEFS += -DUSE_IPV6=$(USE_IPV6)
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
51 # TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
52 HEADERS = $(wildcard *.h)
75 obj/rpcrawtransaction.o \
90 test check: test_novacoin.exe FORCE
93 obj/%.o: %.cpp $(HEADERS)
94 g++ -c $(CFLAGS) -o $@ $<
96 obj/scrypt-x86.o: scrypt-x86.S
97 $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
99 obj/scrypt-x86_64.o: scrypt-x86_64.S
100 $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
102 novacoind.exe: $(OBJS:obj/%=obj/%)
103 g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
105 TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
107 obj-test/%.o: test/%.cpp $(HEADERS)
108 g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<
110 test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
111 g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)
114 -del /Q novacoind test_novacoin