# Copyright (c) 2009-2010 Satoshi Nakamoto, 2010 Myckel Habets, 2011 Luke Dashjr # Distributed under the MIT/X11 software license, see the accompanying # file license.txt or http://www.opensource.org/licenses/mit-license.php. USE_SSL := USE_UPNP := WXINCLUDEPATHS=$(shell wx-config --cxxflags) WXLIBS=$(shell wx-config --libs) CXXFLAGS := -g -O2 LDFLAGS := xLDFLAGS += \ -Wl,-Bdynamic \ -l boost_system$(BOOST_LIB_SUFFIX) \ -l boost_filesystem$(BOOST_LIB_SUFFIX) \ -l boost_program_options$(BOOST_LIB_SUFFIX) \ -l boost_thread$(BOOST_LIB_SUFFIX) \ -l ssl \ -l crypto \ -l crypto++ \ -l z \ -l dl xCXXFLAGS += -pthread xLDFLAGS += -pthread xCXXFLAGS += $(BOOST_CXXFLAGS) xLDFLAGS += $(BOOST_LDFLAGS) xCXXFLAGS += $(DB_CXXFLAGS) xLDFLAGS += $(DB_LDFLAGS) ifneq ($(USE_SSL),) xCXXFLAGS += -DUSE_SSL endif ifneq ($(USE_UPNP),) xLDFLAGS += -l miniupnpc xCXXFLAGS += -DUSE_UPNP=$(USE_UPNP) endif xCXXFLAGS += -D__WXDEBUG__ xCXXFLAGS += -DNOPCH xCXXFLAGS += -Wno-invalid-offsetof -Wformat xCXXFLAGS += $(CXXFLAGS) xLDFLAGS += $(LDFLAGS) HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ checkpoints.h crypter.h keystore.h wallet.h protocol.h \ script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h OBJS= \ obj/checkpoints.o \ obj/crypter.o \ obj/util.o \ obj/script.o \ obj/db.o \ obj/net.o \ obj/protocol.o \ obj/irc.o \ obj/keystore.o \ obj/main.o \ obj/wallet.o \ obj/rpc.o \ obj/init.o all: bitcoin obj/%.o: %.cpp $(HEADERS) $(CXX) -c $(xCXXFLAGS) $(WXINCLUDEPATHS) -DGUI -o $@ $< bitcoin: $(OBJS) obj/ui.o obj/uibase.o $(CXX) -o $@ $^ $(WXLIBS) $(xLDFLAGS) obj/nogui/%.o: %.cpp $(HEADERS) $(CXX) -c $(xCXXFLAGS) -o $@ $< bitcoind: $(OBJS:obj/%=obj/nogui/%) $(CXX) -o $@ $^ $(xLDFLAGS)