2010-02-12 21:38:44 +01:00
|
|
|
# Copyright (c) 2009-2010 Satoshi Nakamoto
|
2009-11-05 05:41:36 +01:00
|
|
|
# Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
|
2010-07-29 22:27:12 +02:00
|
|
|
INCLUDEPATHS= \
|
|
|
|
-I"/usr/local/include/wx-2.9" \
|
|
|
|
-I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9"
|
2009-11-08 05:24:52 +01:00
|
|
|
|
2010-07-29 22:27:12 +02:00
|
|
|
WXLIBS= \
|
|
|
|
-Wl,-Bstatic \
|
|
|
|
-l wx_gtk2ud-2.9 \
|
|
|
|
-Wl,-Bdynamic \
|
|
|
|
-l gtk-x11-2.0 -l SM
|
|
|
|
|
2010-07-31 01:22:55 +02:00
|
|
|
# for boost 1.37, add -mt to the boost libraries
|
2009-11-05 05:41:36 +01:00
|
|
|
LIBS= \
|
2009-12-11 17:49:21 +01:00
|
|
|
-Wl,-Bstatic \
|
2010-07-26 19:15:18 +02:00
|
|
|
-l boost_system \
|
|
|
|
-l boost_filesystem \
|
|
|
|
-l boost_program_options \
|
|
|
|
-l boost_thread \
|
2009-12-11 17:49:21 +01:00
|
|
|
-l db_cxx \
|
|
|
|
-l crypto \
|
2010-07-15 02:18:45 +02:00
|
|
|
-Wl,-Bdynamic \
|
2010-02-25 22:55:27 +01:00
|
|
|
-l gthread-2.0
|
2009-11-08 05:24:52 +01:00
|
|
|
|
2010-08-16 00:46:58 +02:00
|
|
|
DEFS=-D__WXGTK__ -DNOPCH -DFOURWAYSSE2
|
2010-02-17 18:22:01 +01:00
|
|
|
DEBUGFLAGS=-g -D__WXDEBUG__
|
2010-07-29 22:27:12 +02:00
|
|
|
CFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
|
2010-02-25 22:55:27 +01:00
|
|
|
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
|
2010-07-27 20:14:32 +02:00
|
|
|
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
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
all: bitcoin
|
|
|
|
|
|
|
|
|
2010-07-31 01:22:55 +02:00
|
|
|
obj/%.o: %.cpp $(HEADERS)
|
2010-07-29 22:27:12 +02:00
|
|
|
g++ -c $(CFLAGS) -DGUI -o $@ $<
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2010-07-27 20:14:32 +02:00
|
|
|
cryptopp/obj/%.o: cryptopp/%.cpp
|
2010-08-09 21:54:40 +02:00
|
|
|
g++ -c $(CFLAGS) -O3 -o $@ $<
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2010-08-16 00:46:58 +02:00
|
|
|
obj/sha256.o: sha256.cpp
|
2010-08-16 15:11:32 +02:00
|
|
|
g++ -c $(CFLAGS) -msse2 -O3 -march=amdfam10 -o $@ $<
|
2010-08-16 00:46:58 +02:00
|
|
|
|
|
|
|
bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha256.o
|
2010-07-31 01:22:55 +02:00
|
|
|
g++ $(CFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
|
2010-02-10 20:33:04 +01:00
|
|
|
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
obj/nogui/%.o: %.cpp $(HEADERS)
|
2010-07-26 19:15:18 +02:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2010-08-16 00:46:58 +02:00
|
|
|
bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha256.o
|
2010-07-31 01:22:55 +02:00
|
|
|
g++ $(CFLAGS) -o $@ $^ $(LIBS)
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2010-07-08 18:14:56 +02:00
|
|
|
-rm -f obj/*.o
|
|
|
|
-rm -f obj/nogui/*.o
|
2010-07-27 20:14:32 +02:00
|
|
|
-rm -f cryptopp/obj/*.o
|
2010-07-08 18:14:56 +02:00
|
|
|
-rm -f headers.h.gch
|