SKALE-1850 build improvements

parent 22fb70bc
...@@ -46,7 +46,7 @@ secure_enclave.edl: secure_enclave/secure_enclave.edl ...@@ -46,7 +46,7 @@ secure_enclave.edl: secure_enclave/secure_enclave.edl
#AM_CFLAGS = -g -Og #AM_CFLAGS = -g -Og
#AM_CXXFLAGS = ${AM_CPPFLAGS} #AM_CXXFLAGS = ${AM_CPPFLAGS}
AM_CPPFLAGS += -Wall -DSKALE_SGX=1 -DBINARY_OUTPUT=1 -Ileveldb/include -IlibBLS/bls -IlibBLS/libff -IlibBLS -fno-builtin-memset $(GMP_CPPFLAGS) -I. AM_CPPFLAGS += -Wall -DSKALE_SGX=1 -DBINARY_OUTPUT=1 -Ileveldb/include -IlibBLS/bls -IlibBLS/libff -IlibBLS -fno-builtin-memset $(GMP_CPPFLAGS) -I. -I./libBLS/deps/deps_inst/x86_or_x64/include
## Additional targets to remove with 'make clean'. You must list ## Additional targets to remove with 'make clean'. You must list
## any edger8r generated files here. ## any edger8r generated files here.
...@@ -74,7 +74,7 @@ nodist_sgxwallet_SOURCES = $(COMMON_ENCLAVE_SRC) ...@@ -74,7 +74,7 @@ nodist_sgxwallet_SOURCES = $(COMMON_ENCLAVE_SRC)
EXTRA_sgxwallet_DEPENDENCIES = secure_enclave.signed.so EXTRA_sgxwallet_DEPENDENCIES = secure_enclave.signed.so
BUILT_SOURCES = $(COMMON_ENCLAVE_SRC) BUILT_SOURCES = $(COMMON_ENCLAVE_SRC)
AM_LDFLAGS += $(GMP_LDFLAGS) AM_LDFLAGS += $(GMP_LDFLAGS) -L./libBLS/deps/deps_inst/x86_or_x64/lib
secure_enclave.signed.so: secure_enclave/secure_enclave.signed.so secure_enclave.signed.so: secure_enclave/secure_enclave.signed.so
ln -s $? ln -s $?
......
...@@ -62,7 +62,7 @@ Dependencies only need to be built once. ...@@ -62,7 +62,7 @@ Dependencies only need to be built once.
cd scripts; ./build.py; cd .. cd scripts; ./build.py; cd ..
``` ```
## Configure ## Configure and build
Co to the project's top directory, then run Co to the project's top directory, then run
...@@ -73,16 +73,6 @@ autoheader ...@@ -73,16 +73,6 @@ autoheader
automake --force-missing --add-missing automake --force-missing --add-missing
autoconf autoconf
./configure ./configure
```
## Build
Go to project's top directory and run
```
#export CFLAGS=-I`readlink -f ./libBLS/deps/deps_inst/x86_or_x64/include`
#export CXXFLAGS=-I`readlink -f ./libBLS/deps/deps_inst/x86_or_x64/include`
#export LDFLAGS=-L`readlink -f ./libBLS/deps/deps_inst/x86_or_x64/lib`
make make
``` ```
......
...@@ -63,7 +63,7 @@ ENCLAVE_KEY=$(ENCLAVE)_private.pem ...@@ -63,7 +63,7 @@ ENCLAVE_KEY=$(ENCLAVE)_private.pem
## Additional Automake flags needed to build the enclave. ## Additional Automake flags needed to build the enclave.
## ##
AM_CPPFLAGS += -Wall -Wno-implicit-function-declaration $(TGMP_CPPFLAGS) -I./trusted_libff -I../sgx-sdk-build/sgxsdk/include/libcxx \ AM_CPPFLAGS += -Wall -Wno-implicit-function-declaration $(TGMP_CPPFLAGS) -I./trusted_libff -I../trusted_libff -I../sgx-sdk-build/sgxsdk/include/libcxx \
-I../intel-sgx-ssl/Linux/package/include -I../intel-sgx-ssl/Linux/package/include
AM_CXXFLAGS += -fno-builtin AM_CXXFLAGS += -fno-builtin
...@@ -97,7 +97,7 @@ secure_enclave_SOURCES = secure_enclave_t.c secure_enclave_t.h \ ...@@ -97,7 +97,7 @@ secure_enclave_SOURCES = secure_enclave_t.c secure_enclave_t.h \
## Be sure to use += to add to, and not replace, the default ## Be sure to use += to add to, and not replace, the default
## AM_LDFLAGS. ## AM_LDFLAGS.
AM_LDFLAGS += $(TGMP_LDFLAGS) AM_LDFLAGS += $(TGMP_LDFLAGS) -L./tgmp-build/lib -L../tgmp-build/lib
## This line is REQUIRED. It can't be generically defined for ## This line is REQUIRED. It can't be generically defined for
......
...@@ -322,10 +322,12 @@ SGXSSL_BINDIR = @SGXSSL_BINDIR@ ...@@ -322,10 +322,12 @@ SGXSSL_BINDIR = @SGXSSL_BINDIR@
AM_CFLAGS = @SGX_ENCLAVE_CFLAGS@ AM_CFLAGS = @SGX_ENCLAVE_CFLAGS@
AM_CPPFLAGS = @SGX_ENCLAVE_CPPFLAGS@ -Wall \ AM_CPPFLAGS = @SGX_ENCLAVE_CPPFLAGS@ -Wall \
-Wno-implicit-function-declaration $(TGMP_CPPFLAGS) \ -Wno-implicit-function-declaration $(TGMP_CPPFLAGS) \
-I./trusted_libff -I../sgx-sdk-build/sgxsdk/include/libcxx \ -I./trusted_libff -I../trusted_libff \
-I../sgx-sdk-build/sgxsdk/include/libcxx \
-I../intel-sgx-ssl/Linux/package/include -I../intel-sgx-ssl/Linux/package/include
AM_CXXFLAGS = @SGX_ENCLAVE_CXXFLAGS@ @SGX_ENCLAVE_CFLAGS@ -fno-builtin AM_CXXFLAGS = @SGX_ENCLAVE_CXXFLAGS@ @SGX_ENCLAVE_CFLAGS@ -fno-builtin
AM_LDFLAGS = @SGX_ENCLAVE_LDFLAGS@ $(TGMP_LDFLAGS) AM_LDFLAGS = @SGX_ENCLAVE_LDFLAGS@ $(TGMP_LDFLAGS) -L./tgmp-build/lib \
-L../tgmp-build/lib
CLEANFILES = $(ENCLAVE).signed.so secure_enclave_t.c \ CLEANFILES = $(ENCLAVE).signed.so secure_enclave_t.c \
secure_enclave_t.h secure_enclave_t.h
@ENCLAVE_RELEASE_SIGN_TRUE@nodist_signed_enclave_rel_SOURCES = signed_enclave_rel.c @ENCLAVE_RELEASE_SIGN_TRUE@nodist_signed_enclave_rel_SOURCES = signed_enclave_rel.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment