You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

makefile.unix 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. CXX=g++
  5. WXINCLUDEPATHS=$(shell wx-config --cxxflags)
  6. WXLIBS=$(shell wx-config --libs)
  7. USE_UPNP:=0
  8. DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
  9. # for boost 1.37, add -mt to the boost libraries
  10. LIBS= \
  11. -Wl,-Bstatic \
  12. -l boost_system \
  13. -l boost_filesystem \
  14. -l boost_program_options \
  15. -l boost_thread \
  16. -l db_cxx \
  17. -l ssl \
  18. -l crypto
  19. ifdef USE_UPNP
  20. LIBS += -l miniupnpc
  21. DEFS += -DUSE_UPNP=$(USE_UPNP)
  22. endif
  23. LIBS+= \
  24. -Wl,-Bdynamic \
  25. -l gthread-2.0 \
  26. -l z \
  27. -l dl \
  28. -l pthread
  29. DEBUGFLAGS=-g -D__WXDEBUG__
  30. CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS)
  31. HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
  32. script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
  33. OBJS= \
  34. obj/util.o \
  35. obj/script.o \
  36. obj/db.o \
  37. obj/net.o \
  38. obj/irc.o \
  39. obj/keystore.o \
  40. obj/main.o \
  41. obj/wallet.o \
  42. obj/rpc.o \
  43. obj/init.o \
  44. cryptopp/obj/sha.o \
  45. cryptopp/obj/cpu.o
  46. all: bitcoin
  47. obj/%.o: %.cpp $(HEADERS)
  48. $(CXX) -c $(CXXFLAGS) $(WXINCLUDEPATHS) -DGUI -o $@ $<
  49. cryptopp/obj/%.o: cryptopp/%.cpp
  50. $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
  51. bitcoin: $(OBJS) obj/ui.o obj/uibase.o
  52. $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
  53. obj/nogui/%.o: %.cpp $(HEADERS)
  54. $(CXX) -c $(CXXFLAGS) -o $@ $<
  55. bitcoind: $(OBJS:obj/%=obj/nogui/%)
  56. $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
  57. obj/test/%.o: test/%.cpp $(HEADERS)
  58. $(CXX) -c $(CFLAGS) -o $@ $<
  59. test_bitcoin: obj/test/test_bitcoin.o
  60. $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
  61. clean:
  62. -rm -f bitcoin bitcoind test_bitcoin
  63. -rm -f obj/*.o
  64. -rm -f obj/nogui/*.o
  65. -rm -f obj/test/*.o
  66. -rm -f cryptopp/obj/*.o
  67. -rm -f headers.h.gch