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.
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-08 05:24:52 +01:00
|
|
|
INCLUDEPATHS= \
|
|
|
|
-I"/usr/include" \
|
2010-01-28 22:49:20 +01:00
|
|
|
-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
|
|
|
|
|
|
|
LIBPATHS= \
|
|
|
|
-L"/usr/lib" \
|
2009-12-11 17:49:21 +01:00
|
|
|
-L"/usr/local/lib"
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
WXLIBS= \
|
|
|
|
-Wl,-Bstatic \
|
|
|
|
-l wx_gtk2ud-2.9 \
|
|
|
|
-Wl,-Bdynamic \
|
|
|
|
-l gtk-x11-2.0 -l SM
|
|
|
|
|
2009-11-05 05:41:36 +01:00
|
|
|
LIBS= \
|
2009-12-11 17:49:21 +01:00
|
|
|
-Wl,-Bstatic \
|
2010-01-28 22:49:20 +01:00
|
|
|
-l boost_system-mt -l boost_filesystem-mt \
|
2009-12-11 17:49:21 +01:00
|
|
|
-l db_cxx \
|
|
|
|
-Wl,-Bdynamic \
|
|
|
|
-l crypto \
|
2010-02-25 22:55:27 +01:00
|
|
|
-l gthread-2.0
|
2009-11-08 05:24:52 +01:00
|
|
|
|
2009-11-05 05:41:36 +01:00
|
|
|
WXDEFS=-D__WXGTK__ -DNOPCH
|
2010-02-17 18:22:01 +01:00
|
|
|
DEBUGFLAGS=-g -D__WXDEBUG__
|
2010-06-15 00:34:33 +02:00
|
|
|
CFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(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 \
|
|
|
|
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h init.h sha.h
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
all: bitcoin
|
|
|
|
|
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
headers.h.gch: headers.h $(HEADERS)
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
obj/%.o: %.cpp $(HEADERS) headers.h.gch
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
obj/sha.o: sha.cpp sha.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -O3 -o $@ $<
|
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
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
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha.o
|
|
|
|
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(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)
|
|
|
|
g++ -c $(CFLAGS) -DwxUSE_GUI=0 -o $@ $<
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2010-02-25 22:55:27 +01:00
|
|
|
bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha.o
|
|
|
|
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -l wx_baseud-2.9 $(LIBS)
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm obj/*
|
2010-02-25 22:55:27 +01:00
|
|
|
-rm obj/nogui/*
|
2009-11-05 05:41:36 +01:00
|
|
|
-rm headers.h.gch
|