Author

Topic: [ANN][YAC] YACoin ongoing development - page 157. (Read 380091 times)

hero member
Activity: 802
Merit: 1003
GCVMMWH
June 02, 2013, 02:22:35 PM

I do not - I was troubleshooting one compile error I was getting in scrypt-jane-romix-template.h, and it was giving me one line number, and when I compared it to floodyberry's, it was 10 lines off.  There was some other commented out lines in the file as well so I decided to just use his repository without looking at the rest of the differences.  Sorry mate.

Damn - I wish I didn't waste the time to surgically add the changes from floodyberry to the existing YAC files as it seems a copy/paste of the full repo is what works. Meh  Cool


WM - I git cloned YAC, removed all of the existing scrypt-jane-master libs and replaced them with all of floodyberry's.  Everything compiled and runs fine in Linux, and from what
Thirtybird mentioned above, Windows as well.  I'm not sure why pocopoco didn't include all of scrypt-jane-master into YAC, but it appears that by removing some files, he may have
screwed up some dependencies, or something.   I propose you check it out and if you think everything looks good, to add all of scrypt-jane-master to YACoin.  
member
Activity: 84
Merit: 10
June 02, 2013, 01:08:58 PM
I was AFK for 4 days... Angry I placed my order to 4.6 . I'm going to wait for few days (max 3-4) and then bye bye  Undecided
Btw I'm keeping like 10000yac for the future Wink (and still mining nonstop with 16 xeon cores)
sr. member
Activity: 406
Merit: 250
The cryptocoin watcher
June 02, 2013, 01:06:39 PM
We YAC cowboys are cool, it's ok. Good luck, I hope you can get back in soon.
legendary
Activity: 2772
Merit: 1028
Duelbits.com
June 02, 2013, 01:03:25 PM
wrong day to cash out, you could take 20% more day or two ago + bitcoin is some 10% down today.

I'd take those from you but I'm bit short with btc at the moment.
member
Activity: 84
Merit: 10
June 02, 2013, 01:01:08 PM
Ok guys, I really need to cash out some money "right now" (max 3-4 days)  Embarrassed

So don't take my 11000yac sell like a panic dumping. I really would like to keep yacoins for further investment, but there is no other way for me right now  Cry

Btw lets make yac at least 0.0005BTC (or 0.005BTC?  Wink)
hero member
Activity: 693
Merit: 500
June 02, 2013, 12:52:31 PM

Nope.  I wonder if all the people who are having success are compiling on Windows 7 x64 - I've been working on x86.  I even went so far as to pull WindMaster's code, then pull the new scrypt-jane from floodyberry and then put in cryptrol's exact makefile.mingw (changing library paths as needed), and I still got the exact same errors I was getting.  My makefile.mingw was nearly identical to the ones posted here, so when I get a chance, I'll spin up an x64 VM and run through the same process and see if the results are any different - there may be something wrong in the x86 library that is working in the x64 library.


UPDATE: apparently I just needed a good night sleep - yacoind.exe is done on x86 and x64.  Joe_Bauers - your github copy was not complete...  some files were different, and the big thing even I was missing was that the files in scrypt-jane (not just scrypt-jane/code) needed to be replaced.  Once that was done, my next make suceeded (both in DOS using mingw32-make and under msys using make).  I think it would be correct at this time to add floodyberry's latest update to the yacoin src and replace the makefile.mingw with cryptrol's.  

Once I get through the qt portion, I'll document my build steps so we can include them

Great news!  Do you have  a list of the files that weren't complete? There were a few files that were never added by pocopoco, so maybe they need to be in YAC?



I do not - I was troubleshooting one compile error I was getting in scrypt-jane-romix-template.h, and it was giving me one line number, and when I compared it to floodyberry's, it was 10 lines off.  There was some other commented out lines in the file as well so I decided to just use his repository without looking at the rest of the differences.  Sorry mate.
hero member
Activity: 802
Merit: 1003
GCVMMWH
June 01, 2013, 11:51:17 PM

Nope.  I wonder if all the people who are having success are compiling on Windows 7 x64 - I've been working on x86.  I even went so far as to pull WindMaster's code, then pull the new scrypt-jane from floodyberry and then put in cryptrol's exact makefile.mingw (changing library paths as needed), and I still got the exact same errors I was getting.  My makefile.mingw was nearly identical to the ones posted here, so when I get a chance, I'll spin up an x64 VM and run through the same process and see if the results are any different - there may be something wrong in the x86 library that is working in the x64 library.


UPDATE: apparently I just needed a good night sleep - yacoind.exe is done on x86 and x64.  Joe_Bauers - your github copy was not complete...  some files were different, and the big thing even I was missing was that the files in scrypt-jane (not just scrypt-jane/code) needed to be replaced.  Once that was done, my next make suceeded (both in DOS using mingw32-make and under msys using make).  I think it would be correct at this time to add floodyberry's latest update to the yacoin src and replace the makefile.mingw with cryptrol's.  

Once I get through the qt portion, I'll document my build steps so we can include them

Great news!  Do you have  a list of the files that weren't complete? There were a few files that were never added by pocopoco, so maybe they need to be in YAC?


These were the commits I made:
Update scrypt-jane-romix-template.h …
Update scrypt-jane-romix-basic.h …
Update scrypt-jane-portable-x86.h …
Update scrypt-jane-mix_salsa-sse2.h …
Update scrypt-jane-mix_salsa-avx.h …
Update scrypt-jane-mix_chacha-ssse3.h …
Update scrypt-jane-mix_chacha-sse2.h …
Update scrypt-jane-mix_chacha-avx.h …
Update scrypt-jane-salsa.h …
Update scrypt-jane-chacha.h …

This is YAC:
scrypt-jane-chacha.h   a month ago   initial release [pocopoco]
scrypt-jane-hash.h   a month ago   initial release [pocopoco]
scrypt-jane-hash_keccak.h   a month ago   initial release [pocopoco]
scrypt-jane-hash_sha256.h   a month ago   initial release [pocopoco]
scrypt-jane-mix_chacha-avx.h   a month ago   scrypt-jane chacha added [pocopoco]
scrypt-jane-mix_chacha-sse2.h   a month ago   scrypt-jane chacha added [pocopoco]
scrypt-jane-mix_chacha-ssse3.h   a month ago   scrypt-jane chacha added [pocopoco]
scrypt-jane-mix_chacha.h   a month ago   scrypt-jane chacha added [pocopoco]
scrypt-jane-mix_salsa-avx.h   a month ago   initial release [pocopoco]
scrypt-jane-mix_salsa-sse2.h   a month ago   initial release [pocopoco]
scrypt-jane-mix_salsa.h   a month ago   initial release [pocopoco]
scrypt-jane-pbkdf2.h   a month ago   initial release [pocopoco]
scrypt-jane-portable-x86.h   a month ago   initial release [pocopoco]
scrypt-jane-portable.h   a month ago   initial release [pocopoco]
scrypt-jane-romix-basic.h   a month ago   initial release [pocopoco]
scrypt-jane-romix-template.h   a month ago   initial release [pocopoco]
scrypt-jane-romix.h   a month ago   initial release [pocopoco]
scrypt-jane-salsa.h   a month ago   initial release [pocopoco]
scrypt-jane-test-vectors.h   a month ago   initial release [pocopoco]


And this is floodyberry's repo, so there is definitely some stuff missing:
scrypt-conf.h         9 months ago   checkin! [floodyberry]
scrypt-jane-chacha.h      14 days ago   check if the cpu supports the impl before saying it's available [floodyberry]
scrypt-jane-hash.h      8 months ago   add Keccak256/512 support [floodyberry]
scrypt-jane-hash_blake256.h   6 months ago   accidentally left 'G' defined [floodyberry]
scrypt-jane-hash_blake512.h   6 months ago   accidentally left 'G' defined [floodyberry]
scrypt-jane-hash_keccak.h   8 months ago   give keccak one unrolled round [floodyberry]
scrypt-jane-hash_sha256.h   9 months ago   checkin! [floodyberry]
scrypt-jane-hash_sha512.h   9 months ago   checkin! [floodyberry]
scrypt-jane-hash_skein512.h   9 months ago   checkin! [floodyberry]
scrypt-jane-mix_chacha-avx.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_chacha-sse2.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_chacha-ssse3.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_chacha.h   9 months ago   checkin! [floodyberry]
scrypt-jane-mix_salsa-avx.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_salsa-sse2.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_salsa.h      9 months ago   checkin! [floodyberry]
scrypt-jane-mix_salsa64-avx.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_salsa64-sse2.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_salsa64-ssse3.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-mix_salsa64.h   6 months ago   add proof of concept salsa6420/8 mixer [floodyberry]
scrypt-jane-pbkdf2.h      9 months ago   zero out memory with derived secrets after use [floodyberry]
scrypt-jane-portable-x86.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-portable.h      6 months ago   allow [64,128,256,512] byte block sizes and typedef the block element… [floodyberry]
scrypt-jane-romix-basic.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-romix-template.h   14 days ago   fixes so it will compile and run under mingw [floodyberry]
scrypt-jane-romix.h      6 months ago   add proof of concept salsa6420/8 mixer [floodyberry]
scrypt-jane-salsa.h      14 days ago   check if the cpu supports the impl before saying it's available [floodyberry]
scrypt-jane-salsa64.h      14 days ago   check if the cpu supports the impl before saying it's available [floodyberry]
scrypt-jane-test-vectors.h   6 months ago   add proof of concept salsa6420/8 mixer [floodyberry]
sr. member
Activity: 266
Merit: 250
June 01, 2013, 09:35:41 PM
My Yacoin client still says Nfactor is 8 but according to my hashes it did go up. What's up with that?

Try pulling and rebuilding the latest source from my github repository.  There was a space of about a day or so after I first added Nfactor and N to the getmininginfo data that it was reporting only what Nfactor was when yacoind was last started.  I fixed that and pushed the fix to github a day or two later, but you may have snagged a copy while the bug was still there.  Alternatively, restart yacoind and it'll show the right info until the next N change near the end of June.


I'm using the latest windows binaries. Can someone build another one with the bug fix in it?
hero member
Activity: 693
Merit: 500
June 01, 2013, 09:33:22 PM

Nope.  I wonder if all the people who are having success are compiling on Windows 7 x64 - I've been working on x86.  I even went so far as to pull WindMaster's code, then pull the new scrypt-jane from floodyberry and then put in cryptrol's exact makefile.mingw (changing library paths as needed), and I still got the exact same errors I was getting.  My makefile.mingw was nearly identical to the ones posted here, so when I get a chance, I'll spin up an x64 VM and run through the same process and see if the results are any different - there may be something wrong in the x86 library that is working in the x64 library.


UPDATE: apparently I just needed a good night sleep - yacoind.exe is done on x86 and x64.  Joe_Bauers - your github copy was not complete...  some files were different, and the big thing even I was missing was that the files in scrypt-jane (not just scrypt-jane/code) needed to be replaced.  Once that was done, my next make suceeded (both in DOS using mingw32-make and under msys using make).  I think it would be correct at this time to add floodyberry's latest update to the yacoin src and replace the makefile.mingw with cryptrol's.  

Once I get through the qt portion, I'll document my build steps so we can include them

EDIT: one thought I had would be to add "-static" to the LDFLAGS in makefile.mingw
sr. member
Activity: 347
Merit: 250
June 01, 2013, 09:23:44 PM
My Yacoin client still says Nfactor is 8 but according to my hashes it did go up. What's up with that?

Try pulling and rebuilding the latest source from my github repository.  There was a space of about a day or so after I first added Nfactor and N to the getmininginfo data that it was reporting only what Nfactor was when yacoind was last started.  I fixed that and pushed the fix to github a day or two later, but you may have snagged a copy while the bug was still there.  Alternatively, restart yacoind and it'll show the right info until the next N change near the end of June.
hero member
Activity: 693
Merit: 500
June 01, 2013, 05:48:50 PM
sr. member
Activity: 266
Merit: 250
June 01, 2013, 02:11:40 PM
Rise Nfactor RISE !

    "blocks" : 77242,
    "currentblocksize" : 1527,
    "currentblocktx" : 1,
    "difficulty" : 1.39981203,
    "errors" : "",
    "generate" : false,
    "genproclimit" : -1,
    "hashespersec" : 0,
    "networkhashps" : 56745133, <- 56Mh the network hash is rising
    "pooledtx" : 1,
    "testnet" : false,
    "Nfactor" : 9,
    "N" : 1024,
    "powreward" : 23.64000000


My Yacoin client still says Nfactor is 8 but according to my hashes it did go up. What's up with that?
hero member
Activity: 637
Merit: 500
June 01, 2013, 01:47:23 PM
And don't forget to use the scrypt-jane from https://github.com/floodyberry/scrypt-jane , the one that comes with yacoin does not compile on mingw.
hero member
Activity: 802
Merit: 1003
GCVMMWH
June 01, 2013, 12:38:41 PM
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
June 01, 2013, 09:56:01 AM
Rise Nfactor RISE !

Here comes 3x longer confirmation time Cheesy
hero member
Activity: 637
Merit: 500
June 01, 2013, 09:34:27 AM
I you are trying to build yacoind on windows you will find out a lot of errors because of the windows makefile (makefile.mingw) is untouched from novacoin, so the new scrypt version is not getting compiled (blame pocopoco).

I used this makefile ( added some comments for the changed lines) :
Code:
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

# No UPNP for this make file
USE_UPNP:=
USE_IPV6:=1

# Change the gcc version and boost version with the ones you have
# I used gcc 4.7 and boost 1.53
INCLUDEPATHS= \
 -I"/home/user/boost_1_53_0" \
 -I"/home/user/db-4.8.30.NC/build_unix" \
 -I"/home/user/openssl-1.0.1e/include"

LIBPATHS= \
 -L"/home/user/boost_1_53_0/stage/lib" \
 -L"/home/user/db-4.8.30.NC/build_unix" \
 -L"/home/user/openssl-1.0.1e"

LIBS= \
 -l boost_system-mgw47-mt-s-1_53 \
 -l boost_filesystem-mgw47-mt-s-1_53 \
 -l boost_program_options-mgw47-mt-s-1_53 \
 -l boost_thread-mgw47-mt-s-1_53 \
 -l boost_chrono-mgw47-mt-s-1_53 \
 -l db_cxx \
 -l ssl \
 -l crypto

DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE
DEBUGFLAGS=-g
CFLAGS=-static -mthreads -O2 -msse2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)

LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat

# This are the scrypt-jane specific parameters needed to compile you can use -msse2 if you don't have sse3
DEFS_JANE=-DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME -O3 -msse3

TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)

ifndef USE_UPNP
override USE_UPNP = -
endif
ifneq (${USE_UPNP}, -)
 INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
 LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
 LIBS += -l miniupnpc -l iphlpapi
 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif

ifneq (${USE_IPV6}, -)
DEFS += -DUSE_IPV6=$(USE_IPV6)
endif

LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi

# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
HEADERS = $(wildcard *.h)

# Notice I added the scrypt-jane obj at the end
OBJS= \
    obj/alert.o \
    obj/version.o \
    obj/checkpoints.o \
    obj/netbase.o \
    obj/addrman.o \
    obj/crypter.o \
    obj/key.o \
    obj/db.o \
    obj/init.o \
    obj/irc.o \
    obj/keystore.o \
    obj/main.o \
    obj/net.o \
    obj/protocol.o \
    obj/bitcoinrpc.o \
    obj/rpcdump.o \
    obj/rpcnet.o \
    obj/rpcmining.o \
    obj/rpcwallet.o \
    obj/rpcblockchain.o \
    obj/rpcrawtransaction.o \
    obj/script.o \
    obj/sync.o \
    obj/util.o \
    obj/wallet.o \
    obj/walletdb.o \
    obj/noui.o \
    obj/kernel.o \
    obj/pbkdf2.o \
    obj/scrypt_mine.o \
    obj/scrypt-x86.o \
    obj/scrypt-x86_64.o \
obj/scrypt-jane.o

all: yacoind.exe

test check: test_yacoin.exe FORCE
test_yacoin.exe

obj/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<

obj/scrypt-x86.o: scrypt-x86.S
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<

obj/scrypt-x86_64.o: scrypt-x86_64.S
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<

# This is needed to compile scrypt-jane with the DEFS_JANE we set before
obj/scrypt-jane.o: scrypt-jane/scrypt-jane.c
gcc -c $(xCXXFLAGS_SCRYPT_JANE) $(DEFS_JANE) -MMD -o $@ $<

yacoind.exe: $(OBJS:obj/%=obj/%)
g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)

TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))

obj-test/%.o: test/%.cpp $(HEADERS)
g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<

test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)

clean:
rm yacoind.exe -f
rm obj/*.*
rm obj-test/*.*

FORCE:


EDIT 1: Fixed the clean section, you can't use del under mingw.

hero member
Activity: 637
Merit: 500
June 01, 2013, 09:21:21 AM
Rise Nfactor RISE !

    "blocks" : 77242,
    "currentblocksize" : 1527,
    "currentblocktx" : 1,
    "difficulty" : 1.39981203,
    "errors" : "",
    "generate" : false,
    "genproclimit" : -1,
    "hashespersec" : 0,
    "networkhashps" : 56745133, <- 56Mh the network hash is rising
    "pooledtx" : 1,
    "testnet" : false,
    "Nfactor" : 9,
    "N" : 1024,
    "powreward" : 23.64000000
sr. member
Activity: 686
Merit: 259
June 01, 2013, 08:09:58 AM
If you are doing solo mining and have to leave it unencrypted, I suggest making two wallets and transfer coins to the encrypted wallet from time to time. As always, backup your data before running any random downloads from teh interwebs.

Sorry if this is offtopic but can't I solo-mine with my wallet encrypted?
My wallet is encrypted and I'm solo-mining with the minerd and I'm not getting any errors.. Huh

You won't find any block if you have your wallet encrypted and locked. Either unlock it for a long time period (walletpassphrase 99999999) or remove encryption.
Oh fuck..I forgot my wallet password and wasted hours of mining on nothing..
Bye 140 YACs ;_;
newbie
Activity: 22
Merit: 0
June 01, 2013, 07:59:02 AM
Hanzac already released a 64-bit Windows build based on my GitHub repository about 2 weeks ago after I fixed the checkpoint warning.  Multiple people have checked it out and haven't observed it to do anything suspicious or unusual:
https://bitcointalksearch.org/topic/m.2207446

Yea, I even sent him a question or two. I was already working on it when I saw that. I was also trying to enable all the options on Windows, qrencode was the only one I couldn't get going. *shrug*
newbie
Activity: 22
Merit: 0
June 01, 2013, 07:55:16 AM
Thank you for posting that it is possible - I've been pondering away most of the night without a terrible amount of success.  Any chance you could link me your Makefile.mingw?  I know there are some problems in there (as the included one wasn't even including scrypt-jane.o in the objects and didn't have the algorithms chosen in the compiler flags like the unix makefile has).

The only dependancy differences I'm noting is that you used boost 1.50 and I've used boost 1.53 - I'm still getting the error I mentioned above, but now that it's actually trying to include scrypt-jane, I've got a whole host of other errors for that which don't make a lot of sense...

Sure. This only gets you so far, have to do the qt pro build afterwards. I think I wasted a lot of time trying to build from within MSYS but ultimately ran this from CMD.

Code:
mingw32-make -f makefile.mingw

Code:
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

USE_UPNP:=0
USE_IPV6:=1

INCLUDEPATHS= \
 -I"d:\boost-1.50.0-mgw" \
 -I"d:\db-4.8.30.NC-mgw\build_unix" \
 -I"d:\openssl-1.0.1e-mgw\include"
 
LIBPATHS= \
 -L"d:\boost-1.50.0-mgw\stage\lib" \
 -L"d:\db-4.8.30.NC-mgw\build_unix" \
 -L"d:\openssl-1.0.1e-mgw"

LIBS= \
 -l boost_system-mgw46-mt-s-1_50 \
 -l boost_filesystem-mgw46-mt-s-1_50 \
 -l boost_program_options-mgw46-mt-s-1_50 \
 -l boost_thread-mgw46-mt-s-1_50 \
 -l boost_chrono-mgw46-mt-s-1_50 \
 -l db_cxx \
 -l ssl \
 -l crypto

DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE
DEBUGFLAGS=-g
CFLAGS=-mthreads -O2 -msse2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat

# scrypt-jane specific parameters
DEFS+=-DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME

xCXXFLAGS_SCRYPT_JANE=-O3 -msse2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
    $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)

TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)

ifndef USE_UPNP
override USE_UPNP = -
endif
ifneq (${USE_UPNP}, -)
 INCLUDEPATHS += -I"d:\miniupnpc-1.8-mgw"
 LIBPATHS += -L"d:\miniupnpc-1.8-mgw\miniupnpc"
 LIBS += -l miniupnpc -l iphlpapi
 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif

ifneq (${USE_IPV6}, -)
DEFS += -DUSE_IPV6=$(USE_IPV6)
endif

LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi

# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
HEADERS = $(wildcard *.h)

OBJS= \
    obj/alert.o \
    obj/version.o \
    obj/checkpoints.o \
    obj/netbase.o \
    obj/addrman.o \
    obj/crypter.o \
    obj/key.o \
    obj/db.o \
    obj/init.o \
    obj/irc.o \
    obj/keystore.o \
    obj/main.o \
    obj/net.o \
    obj/protocol.o \
    obj/bitcoinrpc.o \
    obj/rpcdump.o \
    obj/rpcnet.o \
    obj/rpcmining.o \
    obj/rpcwallet.o \
    obj/rpcblockchain.o \
    obj/rpcrawtransaction.o \
    obj/script.o \
    obj/sync.o \
    obj/util.o \
    obj/wallet.o \
    obj/walletdb.o \
    obj/noui.o \
    obj/kernel.o \
    obj/pbkdf2.o \
    obj/scrypt_mine.o \
    obj/scrypt-x86.o \
    obj/scrypt-x86_64.o \
obj/scrypt-jane.o

all: yacoind.exe

test check: test_yacoin.exe FORCE
test_yacoin.exe

obj/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<

obj/scrypt-x86.o: scrypt-x86.S
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<

obj/scrypt-x86_64.o: scrypt-x86_64.S
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<

obj/scrypt-jane.o: scrypt-jane/scrypt-jane.c
gcc -c $(xCXXFLAGS_SCRYPT_JANE) -MMD -o $@ $<

yacoind.exe: $(OBJS:obj/%=obj/%)
g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)

TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))

obj-test/%.o: test/%.cpp $(HEADERS)
g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<

test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)

clean:
-del /Q yacoind test_yacoin
-del /Q obj\*
-del /Q obj-test\*

FORCE:
Jump to: