X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmakefile.unix;h=bc06fc4f25e6abafa2cf0c85157a689cd573fc29;hb=71bb258543e2a50555397336a0d1ad8f1fccfc4c;hp=f27ea5f5bebfb74b00a482ec33d76572d8b0c1da;hpb=f8dc50f444b94ff21cf582f3686dcc41cb9971d8;p=novacoin.git diff --git a/src/makefile.unix b/src/makefile.unix index f27ea5f..bc06fc4 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -94,10 +94,14 @@ ifeq (${ARCH}, i686) EXT_OPTIONS=-msse2 endif +xOPT_LEVEL=-O2 +ifeq (${USE_O3}, 1) + xOPT_LEVEL=-O3 +endif # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=-O2 $(EXT_OPTIONS) -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ +xCXXFLAGS=$(xOPT_LEVEL) $(EXT_OPTIONS) -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) # LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only @@ -157,32 +161,32 @@ endif ifeq (${USE_ASM}, 1) # 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 +OBJS += crypto/scrypt/asm/obj/scrypt-arm.o crypto/scrypt/asm/obj/scrypt-x86.o crypto/scrypt/asm/obj/scrypt-x86_64.o crypto/scrypt/asm/obj/asm-wrapper.o -scrypt-asm/obj/scrypt-x86.o: scrypt-asm/scrypt-x86.S +crypto/scrypt/asm/obj/scrypt-x86.o: crypto/scrypt/asm/scrypt-x86.S $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -scrypt-asm/obj/scrypt-x86_64.o: scrypt-asm/scrypt-x86_64.S +crypto/scrypt/asm/obj/scrypt-x86_64.o: crypto/scrypt/asm/scrypt-x86_64.S $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -scrypt-asm/obj/scrypt-arm.o: scrypt-asm/scrypt-arm.S +crypto/scrypt/asm/obj/scrypt-arm.o: crypto/scrypt/asm/scrypt-arm.S $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -scrypt-asm/obj/asm-wrapper.o: scrypt-asm/asm-wrapper.cpp +crypto/scrypt/asm/obj/asm-wrapper.o: crypto/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 +OBJS += crypto/scrypt/intrin/obj/scrypt-sse2.o -scrypt-intrin/obj/scrypt-sse2.o: scrypt-intrin/scrypt-sse2.cpp +crypto/scrypt/intrin/obj/scrypt-sse2.o: crypto/scrypt/intrin/scrypt-sse2.cpp $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< else # Generic implementation -OBJS += obj/scrypt-generic.o +OBJS += crypto/scrypt/generic/obj/scrypt-generic.o -obj/scrypt-generic.o: scrypt-generic.cpp +crypto/scrypt/generic/obj/scrypt-generic.o: crypto/scrypt/generic/scrypt-generic.cpp $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< endif endif @@ -212,12 +216,15 @@ clean: -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 crypto/scrypt/asm/obj/*.o + -rm -f crypto/scrypt/asm/obj/*.P + -rm -f crypto/scrypt/asm/obj/*.d + -rm -f crypto/scrypt/intrin/obj/*.o + -rm -f crypto/scrypt/intrin/obj/*.P + -rm -f crypto/scrypt/intrin/obj/*.d + -rm -f crypto/scrypt/generic/obj/*.o + -rm -f crypto/scrypt/generic/obj/*.P + -rm -f crypto/scrypt/generic/obj/*.d -rm -f obj/build.h FORCE: