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.osx 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Copyright (c) 2010 Laszlo Hanyecz
  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. # Mac OS X makefile for bitcoin
  5. # Laszlo Hanyecz (solar@heliacal.net)
  6. CXX=llvm-g++
  7. DEPSDIR=/Users/macosuser/bitcoin/deps
  8. INCLUDEPATHS= \
  9. -I"$(DEPSDIR)/include"
  10. LIBPATHS= \
  11. -L"$(DEPSDIR)/lib"
  12. WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
  13. USE_UPNP:=0
  14. LIBS= -dead_strip \
  15. $(DEPSDIR)/lib/libdb_cxx-4.8.a \
  16. $(DEPSDIR)/lib/libboost_system.a \
  17. $(DEPSDIR)/lib/libboost_filesystem.a \
  18. $(DEPSDIR)/lib/libboost_program_options.a \
  19. $(DEPSDIR)/lib/libboost_thread.a \
  20. $(DEPSDIR)/lib/libssl.a \
  21. $(DEPSDIR)/lib/libcrypto.a
  22. DEFS=$(shell $(DEPSDIR)/bin/wx-config --cxxflags) -D__WXMAC_OSX__ -DNOPCH -DMSG_NOSIGNAL=0 -DUSE_SSL
  23. DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0
  24. # ppc doesn't work because we don't support big-endian
  25. CFLAGS=-mmacosx-version-min=10.5 -arch i386 -arch x86_64 -O3 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
  26. HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
  27. script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h
  28. OBJS= \
  29. obj/util.o \
  30. obj/script.o \
  31. obj/db.o \
  32. obj/net.o \
  33. obj/irc.o \
  34. obj/keystore.o \
  35. obj/main.o \
  36. obj/wallet.o \
  37. obj/rpc.o \
  38. obj/init.o \
  39. cryptopp/obj/sha.o \
  40. cryptopp/obj/cpu.o
  41. ifdef USE_UPNP
  42. LIBS += $(DEPSDIR)/lib/libminiupnpc.a
  43. DEFS += -DUSE_UPNP=$(USE_UPNP)
  44. endif
  45. all: bitcoin
  46. obj/%.o: %.cpp $(HEADERS)
  47. $(CXX) -c $(CFLAGS) -DGUI -o $@ $<
  48. cryptopp/obj/%.o: cryptopp/%.cpp
  49. $(CXX) -c $(CFLAGS) -O3 -DCRYPTOPP_DISABLE_ASM -o $@ $<
  50. bitcoin: $(OBJS) obj/ui.o obj/uibase.o
  51. $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
  52. obj/nogui/%.o: %.cpp $(HEADERS)
  53. $(CXX) -c $(CFLAGS) -o $@ $<
  54. bitcoind: $(OBJS:obj/%=obj/nogui/%)
  55. $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
  56. obj/test/%.o: test/%.cpp $(HEADERS)
  57. $(CXX) -c $(CFLAGS) -o $@ $<
  58. test_bitcoin: obj/test/test_bitcoin.o
  59. $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
  60. clean:
  61. -rm -f bitcoin bitcoind test_bitcoin
  62. -rm -f obj/*.o
  63. -rm -f obj/nogui/*.o
  64. -rm -f obj/test/*.o
  65. -rm -f cryptopp/obj/*.o