Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions contrib/nomacro.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/perl
# Copyright 2012, 2015 [email protected]
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version. See COPYING for more details.
#
# nomacro.pl - expand assembler macros.

#
# Gridcoin: This is needed to build with the optimized scrypt routines on macOS.
#
# cd src/
# ../contrib/nomacro.pl
# cd ..
# make
#
# The script will rewrite the scrypt-*.S files and leave the source files with
# .orig extensions. Please do not check-in the modified versions.
#

use strict;

foreach my $f (<*.S>) {
rename $f, "$f.orig" unless -e "$f.orig";
open FIN, "$f.orig";
open FOUT, ">$f";
my %macros = ();
my %m = ();
while (<FIN>) {
if (m/^\.macro\s+(\w+)\s*(.*)$/) {
$m{name} = $1;
@m{args} = [split /\s*,\s*/, $2];
$m{body} = "";
next;
}
if (m/^\.endm/) {
$macros{$m{name}} = {%m};
%m = ();
next;
}
for my $n (keys %macros) {
if (m/^\s*$n\b\s*(.*)$/) {
my @a = split /\s*,\s*/, $1;
$_ = $macros{$n}{body};
for my $i (0 .. $#{$macros{$n}{args}}) {
s/\\$macros{$n}{args}[$i]\b/$a[$i]/g;
}
last;
}
}
if (%m) {
$m{body} .= $_;
next;
}
print FOUT;
}
close FOUT;
close FIN;
}
26 changes: 16 additions & 10 deletions doc/build-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The built-in one is located in /Applications/Utilities/Terminal.app.

Preparation
-----------
Install the OS X command line tools:
Install the macOS command line tools:

xcode-select --install

Expand All @@ -18,7 +18,7 @@ Then install [Homebrew](https://brew.sh).
Dependencies
------------

brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config qt libqrencode
brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config qt libqrencode libzip

To build .app and .dmg files with, make deploy, you will need RSVG installed.

Expand All @@ -39,22 +39,28 @@ Build Gridcoin
Configure and build the headless gridcoin binaries as well as the GUI (if Qt is found).

Clean out previous builds!!!!!! Do this between version compiles:

make clean


Prepare the assembly code (requires Perl):

cd src/
../contrib/nomacro.pl
cd ..

You can disable the GUI build by passing `--without-gui` to configure.

./autogen.sh
./configure
./configure
make

To have terminal give full readout if desired:

make V=1 -j #number_of_cores_whatever >& build.log

The daemon binary is placed in src/ and the gui client is found in src/qt/.
The daemon binary is placed in src/ and the gui client is found in src/qt/.
Run the gui client for production or testnet for examples with:

./src/qt/gridcoinresearch
./src/qt/gridcoinresearch -testnet
./src/qt/gridcoinresearch -printtoconsole -debug=true -testnet
Expand All @@ -63,10 +69,10 @@ Build Gridcoin

make check

4. You can also create an .app and .dmg that can be found in "Gridcoin-Reasearch":
4. You can also create an .app and .dmg that can be found in "Gridcoin-Reasearch":

make deploy

5. Testnet operating info is found at [Using-Testnet](http://wiki.gridcoin.us/OS_X_Guide#Using_Testnet).
To open the app in testnet mode:

Expand Down
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ GRIDCOIN_CORE_CPP = addrdb.cpp \
scraper/scraper.cpp \
script.cpp \
scrypt.cpp \
scrypt-arm.S \
scrypt-x86_64.S \
scrypt-x86.S \
scheduler.cpp \
Expand Down
Loading