From 84c3fb07b0b8199c7f85c5de280e7100bad0786f Mon Sep 17 00:00:00 2001 From: Jaromil Date: Sat, 23 Apr 2011 11:49:47 +0200 Subject: directory re-organization (keeps the old build system) there is no internal modification of any file in this commit files are moved into directories according to established standards in sourcecode distribution; these directories contain: src - Files that are used in constructing the executable binaries, but are not installed. doc - Files in HTML and text format that document usage, quirks of the implementation, and contributor checklists. locale - Files that contain human language translation of strings used in the program contrib - Files contributed from distributions or other third party implementing scripts and auxiliary programs --- src/makefile.mingw | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/makefile.mingw (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw new file mode 100644 index 000000000..1969ecc97 --- /dev/null +++ b/src/makefile.mingw @@ -0,0 +1,86 @@ +# 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. + +USE_UPNP:=0 + +INCLUDEPATHS= \ + -I"C:\boost-1.43.0-mgw" \ + -I"C:\db-4.7.25.NC-mgw\build_unix" \ + -I"C:\openssl-1.0.0c-mgw\include" \ + -I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \ + -I"C:\wxWidgets-2.9.1-mgw\include" + +LIBPATHS= \ + -L"C:\boost-1.43.0-mgw\stage\lib" \ + -L"C:\db-4.7.25.NC-mgw\build_unix" \ + -L"C:\openssl-1.0.0c-mgw" \ + -L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib" + +WXLIBS= \ + -l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd + +LIBS= \ + -l boost_system-mgw45-mt-s-1_43 \ + -l boost_filesystem-mgw45-mt-s-1_43 \ + -l boost_program_options-mgw45-mt-s-1_43 \ + -l boost_thread-mgw45-mt-s-1_43 \ + -l db_cxx \ + -l eay32 + +DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH +DEBUGFLAGS=-g -D__WXDEBUG__ +CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ + script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h + +ifdef USE_UPNP + INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" + LIBPATHS += -L"C:\upnpc-exe-win32-20110215" + LIBS += -l miniupnpc -l iphlpapi + DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) +endif + +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 shlwapi + +OBJS= \ + obj/util.o \ + obj/script.o \ + obj/db.o \ + obj/net.o \ + obj/irc.o \ + obj/main.o \ + obj/rpc.o \ + obj/init.o \ + cryptopp/obj/sha.o \ + cryptopp/obj/cpu.o + + +all: bitcoin.exe + + +obj/%.o: %.cpp $(HEADERS) + g++ -c $(CFLAGS) -DGUI -o $@ $< + +cryptopp/obj/%.o: cryptopp/%.cpp + g++ -c $(CFLAGS) -O3 -DCRYPTOPP_X86_ASM_AVAILABLE -o $@ $< + +obj/ui_res.o: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp rc/send16masknoshadow.bmp rc/send20.bmp rc/send20mask.bmp rc/addressbook16.bmp rc/addressbook16mask.bmp rc/addressbook20.bmp rc/addressbook20mask.bmp + windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $< + +bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o + g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS) + + +obj/nogui/%.o: %.cpp $(HEADERS) + g++ -c $(CFLAGS) -o $@ $< + +bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o + g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) + + +clean: + -del /Q obj\* + -del /Q obj\nogui\* + -del /Q cryptopp\obj\* + -del /Q headers.h.gch -- cgit v1.2.3 From bcb971f930605c45d163da56679af06283981c5c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 14 May 2011 18:51:52 +0200 Subject: Fix MinGW build due to bad pointers to ui.rc pixmaps stuff. --- src/makefile.mingw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw index 1969ecc97..57ece3ba2 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -65,7 +65,7 @@ obj/%.o: %.cpp $(HEADERS) cryptopp/obj/%.o: cryptopp/%.cpp g++ -c $(CFLAGS) -O3 -DCRYPTOPP_X86_ASM_AVAILABLE -o $@ $< -obj/ui_res.o: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp rc/send16masknoshadow.bmp rc/send20.bmp rc/send20mask.bmp rc/addressbook16.bmp rc/addressbook16mask.bmp rc/addressbook20.bmp rc/addressbook20mask.bmp +obj/ui_res.o: ../share/ui.rc ../share/pixmaps/bitcoin.ico ../share/pixmaps/check.ico ../share/pixmaps/send16.bmp ../share/pixmaps/send16mask.bmp ../share/pixmaps/send16masknoshadow.bmp ../share/pixmaps/send20.bmp ../share/pixmaps/send20mask.bmp ../share/pixmaps/addressbook16.bmp ../share/pixmaps/addressbook16mask.bmp ../share/pixmaps/addressbook20.bmp ../share/pixmaps/addressbook20mask.bmp windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $< bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o -- cgit v1.2.3 From 0649b6af90bbe8f3e12f0fae6516ca12125d1dc9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 27 May 2011 02:53:13 +0200 Subject: Update to openssl-1.0.0d and enable RPC-SSL on Win32 --- src/makefile.mingw | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw index 57ece3ba2..c3a964e8f 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -7,14 +7,14 @@ USE_UPNP:=0 INCLUDEPATHS= \ -I"C:\boost-1.43.0-mgw" \ -I"C:\db-4.7.25.NC-mgw\build_unix" \ - -I"C:\openssl-1.0.0c-mgw\include" \ + -I"C:\openssl-1.0.0d-mgw\include" \ -I"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib\mswud" \ -I"C:\wxWidgets-2.9.1-mgw\include" LIBPATHS= \ -L"C:\boost-1.43.0-mgw\stage\lib" \ -L"C:\db-4.7.25.NC-mgw\build_unix" \ - -L"C:\openssl-1.0.0c-mgw" \ + -L"C:\openssl-1.0.0d-mgw" \ -L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib" WXLIBS= \ @@ -26,9 +26,10 @@ LIBS= \ -l boost_program_options-mgw45-mt-s-1_43 \ -l boost_thread-mgw45-mt-s-1_43 \ -l db_cxx \ - -l eay32 + -l ssl \ + -l crypto -DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH +DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL DEBUGFLAGS=-g -D__WXDEBUG__ CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ -- cgit v1.2.3 From e89b9f6a2abaa120ff0fc3cea9ae364e8cbd25e4 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 1 Jun 2011 18:27:05 +0200 Subject: move wallet code to separate file This introduces two new source files, keystore.cpp and wallet.cpp with corresponding headers. Code is moved from main and db, in a preparation for a follow-up commit which introduces the classes CWallet and CKeyStore. --- src/makefile.mingw | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw index c3a964e8f..fccc0e36a 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -33,7 +33,7 @@ DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL DEBUGFLAGS=-g -D__WXDEBUG__ CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ - script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h + script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h ifdef USE_UPNP INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" @@ -50,7 +50,9 @@ OBJS= \ obj/db.o \ obj/net.o \ obj/irc.o \ + obj/keystore.o \ obj/main.o \ + obj/wallet.o \ obj/rpc.o \ obj/init.o \ cryptopp/obj/sha.o \ -- cgit v1.2.3 From 8baf865c94653e21d4f6f43bbb5c712b16aba0e4 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Mon, 27 Jun 2011 14:05:02 -0400 Subject: Boost unit-testing framework. make -f makefile.{unix,osx,mingw} test_bitcoin to compile dumb, do-almost-nothing placeholder unit tests. --- src/makefile.mingw | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw index fccc0e36a..507833be4 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -81,9 +81,17 @@ obj/nogui/%.o: %.cpp $(HEADERS) bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) +obj/test/%.o: obj/test/%.cpp $(HEADERS) + g++ -c $(CFLAGS) -o $@ $< + +test_bitcoin: obj/test/test_bitcoin.o + g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) clean: + -del /Q bitcoin bitcoind test_bitcoin -del /Q obj\* -del /Q obj\nogui\* + -del /Q obj\test\* -del /Q cryptopp\obj\* + -del /Q test\*.o -del /Q headers.h.gch -- cgit v1.2.3 From ee1f884229736da6f5443157ccba97f4e8f50f82 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 2 Jul 2011 01:03:07 +0200 Subject: Make UPnP default on Bitcoin but not on Bitcoind. This is a bit of an ugly hack, but its the only way to do it. --- src/makefile.mingw | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw index 507833be4..994f47c82 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -2,8 +2,6 @@ # Distributed under the MIT/X11 software license, see the accompanying # file license.txt or http://www.opensource.org/licenses/mit-license.php. -USE_UPNP:=0 - INCLUDEPATHS= \ -I"C:\boost-1.43.0-mgw" \ -I"C:\db-4.7.25.NC-mgw\build_unix" \ @@ -35,12 +33,22 @@ CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(I HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h -ifdef USE_UPNP - INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" - LIBPATHS += -L"C:\upnpc-exe-win32-20110215" - LIBS += -l miniupnpc -l iphlpapi - DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) -endif + +bitcoin.exe: USE_UPNP:=1 + ifdef USE_UPNP + INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" + LIBPATHS += -L"C:\upnpc-exe-win32-20110215" + LIBS += -l miniupnpc -l iphlpapi + DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) + endif + +bitcoind.exe: USE_UPNP:=0 + ifdef USE_UPNP + INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" + LIBPATHS += -L"C:\upnpc-exe-win32-20110215" + LIBS += -l miniupnpc -l iphlpapi + DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) + endif 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 shlwapi -- cgit v1.2.3 From 3f0950ea019ad43c2a8fc79c2aa61845003bd4dc Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 5 Jul 2011 18:19:34 +0200 Subject: Revert "Make UPnP default on Bitcoin but not on Bitcoind." This reverts commit ee1f884229736da6f5443157ccba97f4e8f50f82. Stupid, stupid me...there is exactly 0 way to convince make to execute a conditional based on a target-specific variable. --- src/makefile.mingw | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/makefile.mingw') diff --git a/src/makefile.mingw b/src/makefile.mingw index 994f47c82..507833be4 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -2,6 +2,8 @@ # Distributed under the MIT/X11 software license, see the accompanying # file license.txt or http://www.opensource.org/licenses/mit-license.php. +USE_UPNP:=0 + INCLUDEPATHS= \ -I"C:\boost-1.43.0-mgw" \ -I"C:\db-4.7.25.NC-mgw\build_unix" \ @@ -33,22 +35,12 @@ CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(I HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h - -bitcoin.exe: USE_UPNP:=1 - ifdef USE_UPNP - INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" - LIBPATHS += -L"C:\upnpc-exe-win32-20110215" - LIBS += -l miniupnpc -l iphlpapi - DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) - endif - -bitcoind.exe: USE_UPNP:=0 - ifdef USE_UPNP - INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" - LIBPATHS += -L"C:\upnpc-exe-win32-20110215" - LIBS += -l miniupnpc -l iphlpapi - DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) - endif +ifdef USE_UPNP + INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215" + LIBPATHS += -L"C:\upnpc-exe-win32-20110215" + LIBS += -l miniupnpc -l iphlpapi + DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) +endif 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 shlwapi -- cgit v1.2.3