2011-07-03 14:41:09 +02:00
|
|
|
# Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
|
|
# Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
DEPSDIR:=/usr/i586-mingw32msvc
|
|
|
|
|
2011-07-13 04:38:13 +02:00
|
|
|
USE_UPNP:=0
|
|
|
|
|
2011-07-03 14:41:09 +02:00
|
|
|
INCLUDEPATHS= \
|
2011-08-12 00:20:07 +02:00
|
|
|
-I"$(DEPSDIR)/boost_1_47_0" \
|
|
|
|
-I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
|
2011-10-24 21:27:54 +02:00
|
|
|
-I"$(DEPSDIR)/openssl-1.0.0e/include" \
|
2011-07-03 14:41:09 +02:00
|
|
|
-I"$(DEPSDIR)"
|
|
|
|
|
|
|
|
LIBPATHS= \
|
2011-08-12 00:20:07 +02:00
|
|
|
-L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
|
|
|
|
-L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
|
2011-10-24 21:27:54 +02:00
|
|
|
-L"$(DEPSDIR)/openssl-1.0.0e"
|
2011-07-03 14:41:09 +02:00
|
|
|
|
|
|
|
LIBS= \
|
|
|
|
-l boost_system-mt-s \
|
|
|
|
-l boost_filesystem-mt-s \
|
|
|
|
-l boost_program_options-mt-s \
|
|
|
|
-l boost_thread_win32-mt-s \
|
|
|
|
-l db_cxx \
|
|
|
|
-l ssl \
|
|
|
|
-l crypto
|
|
|
|
|
2011-09-26 16:04:04 +02:00
|
|
|
DEFS=-D_MT -DWIN32 -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
|
|
|
|
DEBUGFLAGS=-g
|
2011-07-03 14:41:09 +02:00
|
|
|
CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
|
2011-07-13 04:38:13 +02:00
|
|
|
|
2011-09-27 20:16:07 +02:00
|
|
|
|
2011-07-13 04:38:13 +02:00
|
|
|
ifdef USE_UPNP
|
2011-08-12 00:20:07 +02:00
|
|
|
LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
|
2011-07-13 04:38:13 +02:00
|
|
|
LIBS += -l miniupnpc -l iphlpapi
|
|
|
|
DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
|
|
|
|
endif
|
2011-07-03 14:41:09 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-01-12 22:55:44 +01:00
|
|
|
# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
|
|
|
|
HEADERS = $(wildcard *.h)
|
|
|
|
|
2011-07-03 14:41:09 +02:00
|
|
|
OBJS= \
|
2011-09-08 22:50:58 +02:00
|
|
|
obj/checkpoints.o \
|
2012-01-03 23:33:31 +01:00
|
|
|
obj/netbase.o \
|
2011-08-11 17:19:36 +02:00
|
|
|
obj/crypter.o \
|
2011-12-19 19:20:53 +01:00
|
|
|
obj/key.o \
|
2011-07-03 14:41:09 +02:00
|
|
|
obj/db.o \
|
2011-08-11 17:19:36 +02:00
|
|
|
obj/init.o \
|
2011-07-03 14:41:09 +02:00
|
|
|
obj/irc.o \
|
|
|
|
obj/keystore.o \
|
|
|
|
obj/main.o \
|
2011-08-11 17:19:36 +02:00
|
|
|
obj/net.o \
|
2011-08-11 18:14:53 +02:00
|
|
|
obj/protocol.o \
|
2011-09-18 12:41:48 +02:00
|
|
|
obj/bitcoinrpc.o \
|
2011-12-19 19:20:53 +01:00
|
|
|
obj/rpcdump.o \
|
2011-08-11 17:19:36 +02:00
|
|
|
obj/script.o \
|
|
|
|
obj/util.o \
|
2011-09-27 20:16:07 +02:00
|
|
|
obj/wallet.o
|
2011-07-03 14:41:09 +02:00
|
|
|
|
2011-09-26 16:04:04 +02:00
|
|
|
all: bitcoind.exe
|
2011-07-03 14:41:09 +02:00
|
|
|
|
|
|
|
obj/nogui/%.o: %.cpp $(HEADERS)
|
|
|
|
i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2011-10-07 20:35:36 +02:00
|
|
|
bitcoind.exe: $(OBJS:obj/%=obj/nogui/%)
|
2011-07-03 14:41:09 +02:00
|
|
|
i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
obj/test/%.o: obj/test/%.cpp $(HEADERS)
|
|
|
|
i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2011-07-31 20:00:38 +02:00
|
|
|
test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
|
2011-07-03 14:41:09 +02:00
|
|
|
i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f obj/*.o
|
|
|
|
-rm -f obj/nogui/*.o
|
|
|
|
-rm -f obj/test/*.o
|
|
|
|
-rm -f test/*.o
|
|
|
|
-rm -f headers.h.gch
|
|
|
|
-rm -f bitcoind.exe
|
|
|
|
-rm -f test_bitcoin.exe
|