Remove msvc C4245 warning, better readability.
[novacoin.git] / src / makefile.osx
index f2411b0..7c37722 100644 (file)
@@ -48,7 +48,7 @@ LIBS += \
  -lz
 endif
 
-DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE
+DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -D__STDC_FORMAT_MACROS
 
 ifdef RELEASE
 # Compile for maximum compatibility and smallest size.
@@ -93,9 +93,7 @@ OBJS= \
     obj/wallet.o \
     obj/walletdb.o \
     obj/noui.o \
-    obj/pbkdf2.o \
-    obj/kernel.o \
-    obj/scrypt.o
+    obj/kernel.o
 
 ifndef USE_UPNP
        override USE_UPNP = -
@@ -131,20 +129,39 @@ OBJS += obj/txdb-bdb.o
 endif
 
 ifeq (${USE_ASM}, 1)
-OBJS += obj/scrypt-x86.o obj/scrypt-x86_64.o
+# Assembler implementation
+OBJS += scrypt-asm/obj/scrypt-arm.o scrypt-asm/obj/scrypt-x86.o scrypt-asm/obj/scrypt-x86_64.o scrypt-asm/obj/asm-wrapper.o
 
-obj/scrypt-x86.o: scrypt-x86.S
+scrypt-asm/obj/scrypt-x86.o: scrypt-asm/scrypt-x86.S
        $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
 
-obj/scrypt-x86_64.o: scrypt-x86_64.S
+scrypt-asm/obj/scrypt-x86_64.o: scrypt-asm/scrypt-x86_64.S
        $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
-endif
+
+scrypt-asm/obj/scrypt-arm.o: scrypt-asm/scrypt-arm.S
+       $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
+
+scrypt-asm/obj/asm-wrapper.o: scrypt-asm/asm-wrapper.cpp
+       $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
+else
+ifeq  (${USE_SSE2}, 1)
+# Intrinsic implementation
+DEFS += -DUSE_SSE2
+OBJS += scrypt-intrin/obj/scrypt-sse2.o
+
+scrypt-intrin/obj/scrypt-sse2.o: scrypt-intrin/scrypt-sse2.cpp
+       $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
+else
 ifneq (${USE_ASM}, 1)
+# Generic implementation
 OBJS += obj/scrypt-generic.o
 
-obj/scrypt-generic.o: scrypt-generic.c
-       $(CC) -c $(xCXXFLAGS) -MMD -o $@ $<
+obj/scrypt-generic.o: scrypt-generic.cpp
+       $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
 endif
+endif
+endif
+
 
 # auto-generated dependencies:
 -include obj/*.P
@@ -168,6 +185,13 @@ clean:
        -rm -f novacoind
        -rm -f obj/*.o
        -rm -f obj/*.P
+       -rm -f obj/*.d
+       -rm -f scrypt-asm/obj/*.o
+       -rm -f scrypt-asm/obj/*.P
+       -rm -f scrypt-asm/obj/*.d
+       -rm -f scrypt-intrin/obj/*.o
+       -rm -f scrypt-intrin/obj/*.P
+       -rm -f scrypt-intrin/obj/*.d
        -rm -f obj/build.h
 
 FORCE: