Moved checkpoints out of main, to prep for using them to help prevent DoS attacks
[novacoin.git] / src / makefile.linux-mingw
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 DEPSDIR:=/usr/i586-mingw32msvc
6
7 USE_UPNP:=0
8
9 INCLUDEPATHS= \
10  -I"$(DEPSDIR)/boost_1_47_0" \
11  -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
12  -I"$(DEPSDIR)/openssl-1.0.0e/include" \
13  -I"$(DEPSDIR)"
14
15 LIBPATHS= \
16  -L"$(DEPSDIR)/boost_1_47_0/stage/lib" \
17  -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \
18  -L"$(DEPSDIR)/openssl-1.0.0e"
19
20 LIBS= \
21  -l boost_system-mt-s \
22  -l boost_filesystem-mt-s \
23  -l boost_program_options-mt-s \
24  -l boost_thread_win32-mt-s \
25  -l db_cxx \
26  -l ssl \
27  -l crypto
28
29 DEFS=-D_MT -DWIN32 -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB
30 DEBUGFLAGS=-g
31 CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
32 HEADERS = \
33     base58.h \
34     bignum.h \
35     checkpoints.h \
36     crypter.h \
37     db.h \
38     headers.h \
39     init.h \
40     irc.h \
41     key.h \
42     keystore.h \
43     main.h \
44     net.h \
45     noui.h \
46     protocol.h \
47     bitcoinrpc.h \
48     script.h \
49     serialize.h \
50     strlcpy.h \
51     uint256.h \
52     util.h \
53     wallet.h
54
55
56 ifdef USE_UPNP
57         LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
58         LIBS += -l miniupnpc -l iphlpapi
59         DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
60 endif
61
62 LIBS += -l mingwthrd -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
63
64 OBJS= \
65     obj/checkpoints.o \
66     obj/crypter.o \
67     obj/db.o \
68     obj/init.o \
69     obj/irc.o \
70     obj/keystore.o \
71     obj/main.o \
72     obj/net.o \
73     obj/protocol.o \
74     obj/bitcoinrpc.o \
75     obj/script.o \
76     obj/util.o \
77     obj/wallet.o
78
79 all: bitcoind.exe
80
81 obj/nogui/%.o: %.cpp $(HEADERS)
82         i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
83
84 bitcoind.exe: $(OBJS:obj/%=obj/nogui/%)
85         i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
86
87
88 obj/test/%.o: obj/test/%.cpp $(HEADERS)
89         i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
90
91 test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
92         i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
93
94
95 clean:
96         -rm -f obj/*.o
97         -rm -f obj/nogui/*.o
98         -rm -f obj/test/*.o
99         -rm -f test/*.o
100         -rm -f headers.h.gch
101         -rm -f bitcoind.exe
102         -rm -f test_bitcoin.exe