123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- CXX = g++
- RM = rm -f
- CXX_FLAGS = -Wall -O2 -std=c++11 -fpic
- LD = ${CXX} -v
- LD_FLAGS = -Wall -shared -Wl,--no-undefined -Wl,--verbose
- OBJECTS := systemMain.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o
- #SGX_SDK := /home/m2mazmud/sgx2.1_installation/sgxsdk
- SGX_SDK := /opt/intel/sgxsdk
- SGX_COMMON_CFLAGS := -m64
- SGX_LIBRARY_PATH := $(SGX_SDK)/lib64
- Trts_Library_Name := sgx_trts
- Service_Library_Name := sgx_tservice
- Crypto_Library_Name := sgx_tcrypto
- SGX_INCLUDE_PATHS := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx
- Openssl_Path := /home/m2mazmud/plain-openssl
- Uae_Library_Name := sgx_uae_service
- all: localattestation_decryption.so ${OBJECTS}
- clean:
- ${RM} *.obj *~* ${OBJECTS} localattestation_decryption.so
- Sgx%.o: Sgx%.cpp
- ${CXX} -I./include -I$(SGX_SDK)/include ${CXX_FLAGS} -c $^ -o $@
- Protobuf%.o: Protobuf%.cpp
- ${CXX} -I./include ${CXX_FLAGS} -c $^ -o $@
- PostLAMessages.pb.o: PostLAMessages.pb.cpp
- ${CXX} -I./include ${CXX_FLAGS} -c $^ -o $@
- system%.o: system%.cpp
- g++ -I./include ${CXX_FLAGS} -c $^ -o $@
- crypto.o: crypto.cpp
- g++ -I${Openssl_Path}/include ${CXX_FLAGS} -c $^ -o $@
- localattestation_decryption.so: systemMain.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o PostLAMessages.pb.o crypto.o
- ${CXX} ${LD_FLAGS} systemMain.o ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o PostLAMessages.pb.o crypto.o -lphpcpp -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive -l$(Service_Library_Name) -l$(Crypto_Library_Name) -lsgx_tstdc -lprotobuf -Wl,--rpath /home/m2mazmud/plain-openssl/lib -L${Openssl_Path}/lib -lssl -lcrypto -Wl,-Bsymbolic -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -o $@
- #ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o
- # -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive -l$(Service_Library_Name) -l$(Crypto_Library_Name) -lsgx_tstdc -lprotobuf -Wl,--rpath /home/m2mazmud/plain-openssl/lib -L${Openssl_Path}/lib -lssl -lcrypto -Wl,-Bsymbolic -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -Wl,--verbose -lphpcpp -lprotobuf -o $@
- #ProtobufLAInitiator.o SgxProtobufLAInitiator.o SgxProtobufLAInitiator_Transforms.o ProtobufLAMessages.pb.o crypto.o
- # -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive -l$(Service_Library_Name) -l$(Crypto_Library_Name) -lsgx_tstdc
- # -lprotobuf
- # -L${Openssl_Path}/lib -lssl -lcrypto
- # -lphpcpp
- # -Wl,-Bsymbolic -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -Wl,--verbose -o $@
- #-Wl,--rpath /home/m2mazmud/plain-openssl/lib -o $@
|