2009-11-05 05:41:36 +01:00
|
|
|
# Copyright (c) 2009 Satoshi Nakamoto
|
|
|
|
# Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
|
|
|
|
ifneq "$(BUILD)" "debug"
|
|
|
|
ifneq "$(BUILD)" "release"
|
|
|
|
BUILD=debug
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq "$(BUILD)" "debug"
|
|
|
|
D=d
|
|
|
|
DEBUGFLAGS=-g -D__WXDEBUG__
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-08 05:24:52 +01:00
|
|
|
INCLUDEPATHS= \
|
|
|
|
-I"/usr/include" \
|
|
|
|
-I"/usr/local/include/wx-2.8" \
|
|
|
|
-I"/usr/local/lib/wx/include/gtk2-ansi-debug-static-2.8"
|
|
|
|
|
|
|
|
LIBPATHS= \
|
|
|
|
-L"/usr/lib" \
|
2009-12-11 17:49:21 +01:00
|
|
|
-L"/usr/local/lib"
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
LIBS= \
|
2009-12-11 17:49:21 +01:00
|
|
|
-Wl,-Bstatic \
|
|
|
|
-l boost_system -l boost_filesystem \
|
|
|
|
-l db_cxx \
|
|
|
|
-l wx_gtk2$(D)-2.8 \
|
|
|
|
-Wl,-Bdynamic \
|
|
|
|
-l crypto \
|
|
|
|
-l gtk-x11-2.0 -l gthread-2.0 -l SM
|
2009-11-08 05:24:52 +01:00
|
|
|
|
2009-11-05 05:41:36 +01:00
|
|
|
WXDEFS=-D__WXGTK__ -DNOPCH
|
2009-11-18 20:19:41 +01:00
|
|
|
CFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
|
2009-11-05 05:41:36 +01:00
|
|
|
HEADERS=headers.h util.h main.h serialize.h uint256.h key.h bignum.h script.h db.h base58.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all: bitcoin
|
|
|
|
|
|
|
|
|
|
|
|
headers.h.gch: headers.h $(HEADERS) net.h irc.h market.h uibase.h ui.h
|
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/util.o: util.cpp $(HEADERS)
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/script.o: script.cpp $(HEADERS)
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/db.o: db.cpp $(HEADERS) market.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/net.o: net.cpp $(HEADERS) net.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/main.o: main.cpp $(HEADERS) net.h market.h sha.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/market.o: market.cpp $(HEADERS) market.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/ui.o: ui.cpp $(HEADERS) net.h uibase.h ui.h market.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/uibase.o: uibase.cpp uibase.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/sha.o: sha.cpp sha.h
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -O3 -o $@ $<
|
|
|
|
|
2009-12-11 17:49:21 +01:00
|
|
|
obj/irc.o: irc.cpp $(HEADERS)
|
2009-11-05 05:41:36 +01:00
|
|
|
g++ -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2010-02-10 20:33:04 +01:00
|
|
|
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o obj/market.o \
|
2010-02-10 20:33:04 +01:00
|
|
|
obj/ui.o obj/uibase.o obj/sha.o obj/irc.o
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
bitcoin: headers.h.gch $(OBJS)
|
|
|
|
g++ $(CFLAGS) -o $@ $(LIBPATHS) $(OBJS) $(LIBS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm obj/*
|
|
|
|
-rm headers.h.gch
|