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.osx | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/makefile.osx (limited to 'src/makefile.osx') diff --git a/src/makefile.osx b/src/makefile.osx new file mode 100644 index 000000000..4836ea3f4 --- /dev/null +++ b/src/makefile.osx @@ -0,0 +1,80 @@ +# Copyright (c) 2010 Laszlo Hanyecz +# Distributed under the MIT/X11 software license, see the accompanying +# file license.txt or http://www.opensource.org/licenses/mit-license.php. + +# Mac OS X makefile for bitcoin +# Laszlo Hanyecz (solar@heliacal.net) + +CXX=llvm-g++ +DEPSDIR=/Users/macosuser/bitcoin/deps + +INCLUDEPATHS= \ + -I"$(DEPSDIR)/include" + +LIBPATHS= \ + -L"$(DEPSDIR)/lib" + +WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static) + +USE_UPNP:=0 + +LIBS= -dead_strip \ + $(DEPSDIR)/lib/libdb_cxx-4.8.a \ + $(DEPSDIR)/lib/libboost_system.a \ + $(DEPSDIR)/lib/libboost_filesystem.a \ + $(DEPSDIR)/lib/libboost_program_options.a \ + $(DEPSDIR)/lib/libboost_thread.a \ + $(DEPSDIR)/lib/libssl.a \ + $(DEPSDIR)/lib/libcrypto.a + +DEFS=$(shell $(DEPSDIR)/bin/wx-config --cxxflags) -D__WXMAC_OSX__ -DNOPCH -DMSG_NOSIGNAL=0 -DUSE_SSL + +DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0 +# ppc doesn't work because we don't support big-endian +CFLAGS=-mmacosx-version-min=10.5 -arch i386 -arch x86_64 -O3 -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 + +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 + +ifdef USE_UPNP + LIBS += $(DEPSDIR)/lib/libminiupnpc.a + DEFS += -DUSE_UPNP=$(USE_UPNP) +endif + + +all: bitcoin + + +obj/%.o: %.cpp $(HEADERS) + $(CXX) -c $(CFLAGS) -DGUI -o $@ $< + +cryptopp/obj/%.o: cryptopp/%.cpp + $(CXX) -c $(CFLAGS) -O3 -DCRYPTOPP_DISABLE_ASM -o $@ $< + +bitcoin: $(OBJS) obj/ui.o obj/uibase.o + $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS) + + +obj/nogui/%.o: %.cpp $(HEADERS) + $(CXX) -c $(CFLAGS) -o $@ $< + +bitcoind: $(OBJS:obj/%=obj/nogui/%) + $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) + + +clean: + -rm -f bitcoin bitcoind + -rm -f obj/*.o + -rm -f obj/nogui/*.o + -rm -f cryptopp/obj/*.o -- cgit v1.2.3 From 69ae372b51cd589a3ac0b1ad09b0ebb90c1b6861 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 20 May 2011 20:48:44 -0400 Subject: OSX build tweaks (laszlo) --- src/makefile.osx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/makefile.osx') diff --git a/src/makefile.osx b/src/makefile.osx index 4836ea3f4..1e6993d69 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -47,7 +47,7 @@ OBJS= \ cryptopp/obj/sha.o \ cryptopp/obj/cpu.o -ifdef USE_UPNP +ifeq (USE_UPNP, 1) LIBS += $(DEPSDIR)/lib/libminiupnpc.a DEFS += -DUSE_UPNP=$(USE_UPNP) endif -- cgit v1.2.3 From 7ee8e5bf86d38e6cf9ad9dc94067ded922f8f3af Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 21 May 2011 14:14:34 +0200 Subject: Revert "OSX build tweaks (laszlo)" This reverts commit 69ae372b51cd589a3ac0b1ad09b0ebb90c1b6861 which removes support for building the Mac version of Bitcoin with UPnP support and UPnP disabled by default (which should be the default, according to the community vote and as its the default on all other platforms). --- src/makefile.osx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/makefile.osx') diff --git a/src/makefile.osx b/src/makefile.osx index 1e6993d69..4836ea3f4 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -47,7 +47,7 @@ OBJS= \ cryptopp/obj/sha.o \ cryptopp/obj/cpu.o -ifeq (USE_UPNP, 1) +ifdef USE_UPNP LIBS += $(DEPSDIR)/lib/libminiupnpc.a DEFS += -DUSE_UPNP=$(USE_UPNP) endif -- 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.osx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/makefile.osx') diff --git a/src/makefile.osx b/src/makefile.osx index 4836ea3f4..4e173a9df 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -33,7 +33,7 @@ DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0 # ppc doesn't work because we don't support big-endian CFLAGS=-mmacosx-version-min=10.5 -arch i386 -arch x86_64 -O3 -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 OBJS= \ obj/util.o \ @@ -41,7 +41,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.osx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/makefile.osx') diff --git a/src/makefile.osx b/src/makefile.osx index 4e173a9df..784596b72 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -74,9 +74,15 @@ obj/nogui/%.o: %.cpp $(HEADERS) bitcoind: $(OBJS:obj/%=obj/nogui/%) $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) +obj/test/%.o: test/%.cpp $(HEADERS) + $(CXX) -c $(CFLAGS) -o $@ $< + +test_bitcoin: obj/test/test_bitcoin.o + $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework clean: - -rm -f bitcoin bitcoind + -rm -f bitcoin bitcoind test_bitcoin -rm -f obj/*.o -rm -f obj/nogui/*.o + -rm -f obj/test/*.o -rm -f cryptopp/obj/*.o -- 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.osx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/makefile.osx') diff --git a/src/makefile.osx b/src/makefile.osx index 784596b72..36890f986 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -16,8 +16,6 @@ LIBPATHS= \ WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static) -USE_UPNP:=0 - LIBS= -dead_strip \ $(DEPSDIR)/lib/libdb_cxx-4.8.a \ $(DEPSDIR)/lib/libboost_system.a \ @@ -49,10 +47,17 @@ OBJS= \ cryptopp/obj/sha.o \ cryptopp/obj/cpu.o -ifdef USE_UPNP - LIBS += $(DEPSDIR)/lib/libminiupnpc.a - DEFS += -DUSE_UPNP=$(USE_UPNP) -endif +bitcoin: USE_UPNP:=1 + ifdef USE_UPNP + LIBS += $(DEPSDIR)/lib/libminiupnpc.a + DEFS += -DUSE_UPNP=$(USE_UPNP) + endif + +bitcoind: USE_UPNP:=0 + ifdef USE_UPNP + LIBS += $(DEPSDIR)/lib/libminiupnpc.a + DEFS += -DUSE_UPNP=$(USE_UPNP) + endif all: bitcoin -- 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.osx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/makefile.osx') diff --git a/src/makefile.osx b/src/makefile.osx index 36890f986..784596b72 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -16,6 +16,8 @@ LIBPATHS= \ WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static) +USE_UPNP:=0 + LIBS= -dead_strip \ $(DEPSDIR)/lib/libdb_cxx-4.8.a \ $(DEPSDIR)/lib/libboost_system.a \ @@ -47,17 +49,10 @@ OBJS= \ cryptopp/obj/sha.o \ cryptopp/obj/cpu.o -bitcoin: USE_UPNP:=1 - ifdef USE_UPNP - LIBS += $(DEPSDIR)/lib/libminiupnpc.a - DEFS += -DUSE_UPNP=$(USE_UPNP) - endif - -bitcoind: USE_UPNP:=0 - ifdef USE_UPNP - LIBS += $(DEPSDIR)/lib/libminiupnpc.a - DEFS += -DUSE_UPNP=$(USE_UPNP) - endif +ifdef USE_UPNP + LIBS += $(DEPSDIR)/lib/libminiupnpc.a + DEFS += -DUSE_UPNP=$(USE_UPNP) +endif all: bitcoin -- cgit v1.2.3