Remove wxWidgets
[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.0d/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.0d"
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     crypter.h \
36     db.h \
37     headers.h \
38     init.h \
39     irc.h \
40     key.h \
41     keystore.h \
42     main.h \
43     net.h \
44     noui.h \
45     protocol.h \
46     bitcoinrpc.h \
47     script.h \
48     serialize.h \
49     strlcpy.h \
50     uint256.h \
51     util.h \
52     wallet.h
53
54 ifdef USE_UPNP
55         LIBPATHS += -L"$(DEPSDIR)/miniupnpc"
56         LIBS += -l miniupnpc -l iphlpapi
57         DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
58 endif
59
60 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
61
62 OBJS= \
63     obj/crypter.o \
64     obj/db.o \
65     obj/init.o \
66     obj/irc.o \
67     obj/keystore.o \
68     obj/main.o \
69     obj/net.o \
70     obj/protocol.o \
71     obj/bitcoinrpc.o \
72     obj/script.o \
73     obj/util.o \
74     obj/wallet.o \
75     cryptopp/obj/sha.o \
76     cryptopp/obj/cpu.o
77
78
79 all: bitcoind.exe
80
81
82 obj/nogui/%.o: %.cpp $(HEADERS)
83         i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
84
85 bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
86         i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
87
88
89 obj/test/%.o: obj/test/%.cpp $(HEADERS)
90         i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
91
92 test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
93         i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
94
95
96 clean:
97         -rm -f obj/*.o
98         -rm -f obj/nogui/*.o
99         -rm -f obj/test/*.o
100         -rm -f cryptopp/obj/*.o
101         -rm -f test/*.o
102         -rm -f headers.h.gch
103         -rm -f bitcoind.exe
104         -rm -f test_bitcoin.exe