Add wallet privkey encryption.
[novacoin.git] / src / makefile.unix
1 # Copyright (c) 2009-2010 Satoshi Nakamoto
2 # Distributed under the MIT/X11 software license, see the accompanying
3 # file license.txt or http://www.opensource.org/licenses/mit-license.php.
4
5 CXX=g++
6
7 WXINCLUDEPATHS=$(shell wx-config --cxxflags)
8
9 WXLIBS=$(shell wx-config --libs)
10
11 USE_UPNP:=0
12
13 DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
14
15 # for boost 1.37, add -mt to the boost libraries
16 LIBS= \
17  -Wl,-Bstatic \
18    -l boost_system \
19    -l boost_filesystem \
20    -l boost_program_options \
21    -l boost_thread \
22    -l db_cxx \
23    -l ssl \
24    -l crypto
25
26 ifdef USE_UPNP
27         LIBS += -l miniupnpc
28         DEFS += -DUSE_UPNP=$(USE_UPNP)
29 endif
30
31 LIBS+= \
32  -Wl,-Bdynamic \
33    -l gthread-2.0 \
34    -l z \
35    -l dl \
36    -l pthread
37
38
39 DEBUGFLAGS=-g -D__WXDEBUG__
40 CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS)
41 HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
42     script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h \
43     init.h crypter.h
44
45 OBJS= \
46     obj/util.o \
47     obj/script.o \
48     obj/db.o \
49     obj/net.o \
50     obj/irc.o \
51     obj/keystore.o \
52     obj/main.o \
53     obj/wallet.o \
54     obj/rpc.o \
55     obj/init.o \
56     obj/crypter.o \
57     cryptopp/obj/sha.o \
58     cryptopp/obj/cpu.o
59
60
61 all: bitcoin
62
63
64 obj/%.o: %.cpp $(HEADERS)
65         $(CXX) -c $(CXXFLAGS) $(WXINCLUDEPATHS) -DGUI -o $@ $<
66
67 cryptopp/obj/%.o: cryptopp/%.cpp
68         $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
69
70 bitcoin: $(OBJS) obj/ui.o obj/uibase.o
71         $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
72
73
74 obj/nogui/%.o: %.cpp $(HEADERS)
75         $(CXX) -c $(CXXFLAGS) -o $@ $<
76
77 bitcoind: $(OBJS:obj/%=obj/nogui/%)
78         $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
79
80 obj/test/%.o: test/%.cpp $(HEADERS)
81         $(CXX) -c $(CFLAGS) -o $@ $<
82
83 test_bitcoin: obj/test/test_bitcoin.o
84         $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
85
86 clean:
87         -rm -f bitcoin bitcoind test_bitcoin
88         -rm -f obj/*.o
89         -rm -f obj/nogui/*.o
90         -rm -f obj/test/*.o
91         -rm -f cryptopp/obj/*.o
92         -rm -f headers.h.gch