annotate src/makefile.unix @ 874:2e1afcc5958d draft

Cleanup makefiles such that diffs to them are smaller Signed-off-by: Giel van Schijndel <me@mortis.eu>
author Giel van Schijndel <me@mortis.eu>
date Thu, 11 Aug 2011 17:19:36 +0200 (2011-08-11)
parents 82367e19d601
children b5abe85df1e7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
1 # Copyright (c) 2009-2010 Satoshi Nakamoto
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
2 # Distributed under the MIT/X11 software license, see the accompanying
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
3 # file license.txt or http://www.opensource.org/licenses/mit-license.php.
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
4
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
5 CXX=g++
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
6
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
7 WXINCLUDEPATHS=$(shell wx-config --cxxflags)
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
8
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
9 WXLIBS=$(shell wx-config --libs)
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
10
744
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
11 USE_UPNP:=0
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
12
869
82367e19d601 src/makefile.unix: remove -DFOURWAYSSE2
Jeff Garzik <jeff@garzik.org>
parents: 854
diff changeset
13 DEFS=-DNOPCH -DUSE_SSL
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
14
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
15 # for boost 1.37, add -mt to the boost libraries
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
16 LIBS= \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
17 -Wl,-Bstatic \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
18 -l boost_system \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
19 -l boost_filesystem \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
20 -l boost_program_options \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
21 -l boost_thread \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
22 -l db_cxx \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
23 -l ssl \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
24 -l crypto
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
25
744
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
26 ifdef USE_UPNP
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
27 LIBS += -l miniupnpc
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
28 DEFS += -DUSE_UPNP=$(USE_UPNP)
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
29 endif
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
30
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
31 LIBS+= \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
32 -Wl,-Bdynamic \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
33 -l gthread-2.0 \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
34 -l z \
576
8ec6d5e778e5 Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents: 575
diff changeset
35 -l dl \
8ec6d5e778e5 Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents: 575
diff changeset
36 -l pthread
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
37
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
38
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
39 DEBUGFLAGS=-g -D__WXDEBUG__
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
40 CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS)
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
41 HEADERS = \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
42 base58.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
43 bignum.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
44 crypter.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
45 db.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
46 headers.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
47 init.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
48 irc.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
49 key.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
50 keystore.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
51 main.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
52 net.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
53 noui.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
54 rpc.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
55 script.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
56 serialize.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
57 strlcpy.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
58 ui.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
59 uibase.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
60 uint256.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
61 util.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
62 wallet.h
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
63
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
64 OBJS= \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
65 obj/crypter.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
66 obj/db.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
67 obj/init.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
68 obj/irc.o \
689
9df222fa1ef1 move wallet code to separate file
Pieter Wuille <pieter.wuille@gmail.com>
parents: 576
diff changeset
69 obj/keystore.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
70 obj/main.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
71 obj/net.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
72 obj/rpc.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
73 obj/script.o \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
74 obj/util.o \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
75 obj/wallet.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
76 cryptopp/obj/sha.o \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
77 cryptopp/obj/cpu.o
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
78
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
79
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
80 all: bitcoin
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
81
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
82
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
83 obj/%.o: %.cpp $(HEADERS)
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
84 $(CXX) -c $(CXXFLAGS) $(WXINCLUDEPATHS) -DGUI -o $@ $<
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
85
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
86 cryptopp/obj/%.o: cryptopp/%.cpp
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
87 $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
88
576
8ec6d5e778e5 Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents: 575
diff changeset
89 bitcoin: $(OBJS) obj/ui.o obj/uibase.o
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
90 $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
91
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
92
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
93 obj/nogui/%.o: %.cpp $(HEADERS)
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
94 $(CXX) -c $(CXXFLAGS) -o $@ $<
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
95
576
8ec6d5e778e5 Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents: 575
diff changeset
96 bitcoind: $(OBJS:obj/%=obj/nogui/%)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
97 $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
98
708
06d213590314 Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents: 689
diff changeset
99 obj/test/%.o: test/%.cpp $(HEADERS)
854
e414103667ba Fix testing setup
Vegard Nossum <vegard.nossum@gmail.com>
parents: 760
diff changeset
100 $(CXX) -c $(CXXFLAGS) -o $@ $<
708
06d213590314 Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents: 689
diff changeset
101
854
e414103667ba Fix testing setup
Vegard Nossum <vegard.nossum@gmail.com>
parents: 760
diff changeset
102 test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
e414103667ba Fix testing setup
Vegard Nossum <vegard.nossum@gmail.com>
parents: 760
diff changeset
103 $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LIBS)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
104
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
105 clean:
708
06d213590314 Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents: 689
diff changeset
106 -rm -f bitcoin bitcoind test_bitcoin
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
107 -rm -f obj/*.o
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
108 -rm -f obj/nogui/*.o
708
06d213590314 Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents: 689
diff changeset
109 -rm -f obj/test/*.o
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
110 -rm -f cryptopp/obj/*.o
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
111 -rm -f headers.h.gch