Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package=libzerocash | ||
# FIXME: what is the correct version number? | ||
$(package)_version=0.1 | ||
$(package)_download_path=https://github.com/Electric-Coin-Company/$(package)/archive/ | ||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz | ||
$(package)_download_file=$($(package)_git_commit).tar.gz | ||
$(package)_sha256_hash=0f157cc145844b21dbd601f2da6bdba887b4204699eee347b48918ee726b3cb4 | ||
$(package)_git_commit=89aded7b2a59d5d589e053cd4ebc2b06b29aa5cf | ||
|
||
|
||
# FIXME: are there any more dependencies I forgot to list (probably!)? | ||
$(package)_dependencies=libsnark crypto++ | ||
$(package)_patches=1_install_target.patch | ||
|
||
define $(package)_preprocess_cmds | ||
patch -p1 < $($(package)_patch_dir)/1_install_target.patch | ||
endef | ||
|
||
# FIXME: How do we know libsnark (etc.) already exists there? | ||
# What's the proper way for one depends-package to depend on another | ||
# depends-package? | ||
This comment has been minimized.
Sorry, something went wrong. |
||
$(package)_cppflags += -I. -I$(host_prefix)/include -I$(host_prefix)/include/libsnark -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=c++11 -pipe -O2 -O0 -g -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden | ||
This comment has been minimized.
Sorry, something went wrong.
nathan-at-least
Contributor
|
||
|
||
# FIXME: The CXXFLAGS given here overrules the one in the libzerocash | ||
# Makefile... Maybe we should only prefix/append? | ||
This comment has been minimized.
Sorry, something went wrong.
nathan-at-least
Contributor
|
||
define $(package)_build_cmds | ||
$(MAKE) all DEPINST=$(host_prefix) CXXFLAGS="$($(package)_cppflags)" | ||
endef | ||
|
||
define $(package)_stage_cmds | ||
$(MAKE) install STATIC=1 PREFIX=$($(package)_staging_dir)$(host_prefix) | ||
endef |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/Makefile b/Makefile | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
index 7d82a06..6074391 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -36,6 +36,7 @@ EXECUTABLES= \ | ||
|
||
OBJS=$(patsubst %.cpp,%.o,$(SRCS)) | ||
|
||
+ | ||
ifeq ($(MINDEPS),1) | ||
CXXFLAGS += -DMINDEPS | ||
else | ||
@@ -110,7 +111,7 @@ banktest_library: %: bankTest.o $(OBJS) | ||
merkletest_library: %: merkleTest.o $(OBJS) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nathan-at-least
Contributor
|
||
$(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) -lzerocash | ||
|
||
-.PHONY: clean | ||
+.PHONY: clean install | ||
|
||
clean: | ||
$(RM) \ | ||
@@ -120,3 +121,17 @@ clean: | ||
${patsubst %.cpp,%.d,${SRCS}} \ | ||
libzerocash.a \ | ||
tests/test_library | ||
+ | ||
+# FIXME: Copied crudely from libsnark... | ||
This comment has been minimized.
Sorry, something went wrong. |
||
+HEADERS_SRC=$(shell find . -name '*.hpp' -o -name '*.tcc' -o -name '*.h') | ||
+HEADERS_DEST=$(patsubst %,$(PREFIX)/include/libzerocash/%,$(HEADERS_SRC)) | ||
This comment has been minimized.
Sorry, something went wrong.
nathan-at-least
Contributor
|
||
+ | ||
+$(HEADERS_DEST): $(PREFIX)/include/libzerocash/%: % | ||
+ mkdir -p $(shell dirname $@) | ||
+ cp $< $@ | ||
+ | ||
+# TODO: install the test executables into the bin/ directory. | ||
+install: all $(HEADERS_DEST) | ||
+ mkdir -p $(PREFIX)/lib | ||
+ install -m 0755 libzerocash.a $(PREFIX)/lib/ | ||
+ |
1 comment
on commit dd5c000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with the caveat of linked tickets for future work.
I thought that
$(package)_dependencies
above would ensure those dependencies were somehow available during the build of the current$(package)
.