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 -O3 -msse2 -w -Wall -Wextra -Wno-ignored-qualifiers -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) -DMINIUPNP_STATICLIB
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)
76 obj/rpcrawtransaction.o \
93 LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
94 DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) -DUSE_LEVELDB
95 DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
96 OBJS += obj/txdb-leveldb.o
98 cd leveldb; make; cd ..
99 obj/txdb-leveldb.o: leveldb/libleveldb.lib
101 OBJS += obj/txdb-bdb.o
105 OBJS += obj/scrypt-arm.o obj/scrypt-x86.o obj/scrypt-x86_64.o
107 obj/scrypt-x86.o: scrypt-x86.S
108 $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
110 obj/scrypt-x86_64.o: scrypt-x86_64.S
111 $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
113 OBJS += obj/scrypt-generic.o
115 obj/scrypt-generic.o: scrypt-generic.c
116 $(CC) -c $(xCXXFLAGS) -MMD -o $@ $<
119 obj/%.o: %.cpp $(HEADERS)
120 g++ -c $(CFLAGS) -o $@ $<
122 novacoind.exe: $(OBJS:obj/%=obj/%)
123 g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)