genesis 1 # Copyright (c) 2009-2010 Satoshi Nakamoto
genesis 2 # Distributed under the MIT/X11 software license, see the accompanying
genesis 3 # file license.txt or http://www.opensource.org/licenses/mit-license.php.
genesis 4
genesis 5 DEPSDIR:=/usr/i586-mingw32msvc
genesis 6
genesis 7 USE_UPNP:=0
genesis 8
genesis 9 INCLUDEPATHS= \
genesis 10 -I"$(DEPSDIR)/boost_1_47_0" \
genesis 11 -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
genesis 12 -I"$(DEPSDIR)/openssl-1.0.0e/include" \
genesis 13 -I"$(DEPSDIR)"
genesis 14
genesis 15 LIBPATHS= \
genesis 16 -L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
genesis 17 -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
genesis 18 -L"$(DEPSDIR)/openssl-1.0.0e"
genesis 19
genesis 20 LIBS= \
genesis 21 -l boost_system-mt-s \
genesis 22 -l boost_filesystem-mt-s \
genesis 23 -l boost_program_options-mt-s \
genesis 24 -l boost_thread_win32-mt-s \
genesis 25 -l db_cxx \
genesis 26 -l ssl \
genesis 27 -l crypto
genesis 28
genesis 29 DEFS=-D_MT -DWIN32 -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
genesis 30 DEBUGFLAGS=-g
genesis 31 CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
genesis 32 HEADERS = \
genesis 33 base58.h \
genesis 34 bignum.h \
genesis 35 checkpoints.h \
genesis 36 crypter.h \
genesis 37 db.h \
genesis 38 headers.h \
genesis 39 init.h \
genesis 40 irc.h \
genesis 41 key.h \
genesis 42 keystore.h \
genesis 43 main.h \
genesis 44 net.h \
genesis 45 noui.h \
genesis 46 protocol.h \
genesis 47 bitcoinrpc.h \
genesis 48 script.h \
genesis 49 serialize.h \
genesis 50 strlcpy.h \
genesis 51 uint256.h \
genesis 52 util.h \
genesis 53 wallet.h
genesis 54
genesis 55
genesis 56 ifdef USE_UPNP
genesis 57 LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
genesis 58 LIBS += -l miniupnpc -l iphlpapi
genesis 59 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
genesis 60 endif
genesis 61
genesis 62 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
genesis 63
genesis 64 OBJS= \
genesis 65 obj/checkpoints.o \
genesis 66 obj/crypter.o \
genesis 67 obj/db.o \
genesis 68 obj/init.o \
genesis 69 obj/irc.o \
genesis 70 obj/keystore.o \
genesis 71 obj/main.o \
genesis 72 obj/net.o \
genesis 73 obj/protocol.o \
genesis 74 obj/bitcoinrpc.o \
genesis 75 obj/script.o \
genesis 76 obj/util.o \
genesis 77 obj/wallet.o
genesis 78
genesis 79 all: bitcoind.exe
genesis 80
genesis 81 obj/nogui/%.o: %.cpp $(HEADERS)
genesis 82 i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
genesis 83
genesis 84 bitcoind.exe: $(OBJS:obj/%=obj/nogui/%)
genesis 85 i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
genesis 86
genesis 87
genesis 88 obj/test/%.o: obj/test/%.cpp $(HEADERS)
genesis 89 i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
genesis 90
genesis 91 test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
genesis 92 i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
genesis 93
genesis 94
genesis 95 clean:
genesis 96 -rm -f obj/*.o
genesis 97 -rm -f obj/nogui/*.o
genesis 98 -rm -f obj/test/*.o
genesis 99 -rm -f test/*.o
genesis 100 -rm -f headers.h.gch
genesis 101 -rm -f bitcoind.exe
genesis 102 -rm -f test_bitcoin.exe