updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bitcoin-daemon / makefile.parabola
blob9847509827416e9a7df22d08e7c7c44cc14f05d6
1 # Copyright (c) 2009-2010 Satoshi Nakamoto
2 # Rewritten for Archlinux by shahid
3 # Distributed under the MIT/X11 software license, see the accompanying
4 # file license.txt or http://www.opensource.org/licenses/mit-license.php.
6 CXX=g++
8 INCLUDEPATHS= \
9  -I"/usr/include" \
11 LIBPATHS= \
12  -L"/usr/lib" \
13  -L"/usr/local/lib"
15 DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
17 USE_UPNP:=1
19 # --as-needed lazy linking set as default behavior of ld because i guess, there are useless libs here
20 # Of couse, this may be overriden by LDFLAGS in makepkg.conf
21 LIBS= \
22   -Wl,--as-needed \
23    ${LDFLAGS} \
24    -l boost_system \
25    -l boost_filesystem \
26    -l boost_program_options \
27    -l boost_thread \
28    -l db_cxx \
30 ifdef USE_UPNP
31     LIBS += -l miniupnpc
32     DEFS += -DUSE_UPNP=$(USE_UPNP)
33 endif
35 LIBS+= \
36    -l gthread-2.0 \
37    -l z \
38    -l dl \
39    -l ssl \
40    -l crypto 
42 #DEBUGFLAGS=-g -D__WXDEBUG__
43 CCFLAGS=${CXXFLAGS} -DBOOST_FILESYSTEM_DEPRECATED -Wno-invalid-offsetof -Wformat $(WXDEFS) $(INCLUDEPATHS) $(DEFS)
44 HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
45     script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h
47 OBJS= \
48     obj/util.o \
49     obj/script.o \
50     obj/db.o \
51     obj/net.o \
52     obj/irc.o \
53     obj/main.o \
54     obj/rpc.o \
55     obj/init.o \
56     cryptopp/obj/sha.o \
57     cryptopp/obj/cpu.o
60 all: bitcoin
63 headers.h.gch: headers.h $(HEADERS)
64         $(CXX) -c $(CCFLAGS) -DGUI -o $@ $<
66 obj/%.o: %.cpp $(HEADERS) headers.h.gch
67         $(CXX) -c $(CCFLAGS) -DGUI -o $@ $<
69 # -DCRYPTOPP_DISABLE_SSE2
70 cryptopp/obj/%.o: cryptopp/%.cpp
71         $(CXX) -c $(CCFLAGS) -O3 -o $@ $<
73 bitcoin: $(OBJS) obj/ui.o obj/uibase.o
74         $(CXX) $(CCFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(WXLIBS)
76 obj/nogui/%.o: %.cpp $(HEADERS)
77         $(CXX) -c $(CCFLAGS) -o $@ $<
79 bitcoind: $(OBJS:obj/%=obj/nogui/%)
80         $(CXX) $(CCFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
82 clean:
83         -rm -f obj/*.o
84         -rm -f obj/nogui/*.o
85         -rm -f cryptopp/obj/*.o
86         -rm -f headers.h.gch