12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- CXX = g++
- RM = rm -f
- CXX_FLAGS = -Wall -O2 -std=c++11 -fpic -fdata-sections -ffunction-sections
- LD = ${CXX} -v
- LD_FLAGS = -Wall -shared -O2
- all_non_sgx_obj := $(system_obj) $(protobuf_obj)
- all_non_sgx_cpp := $(patsubst %.o,%.cpp,$(all_non_sgx_obj))
- sgx_protobuf_obj := $(patsubst %.cpp,%.o,$(wildcard SgxProtobuf*))
- sgx_obj := $(patsubst %.cpp,%.o,$(wildcard Sgx*))
- protobuf_obj := $(patsubst %.cpp,%.o,$(wildcard Protobuf*))
- system_obj := $(patsubst %.cpp,%.o,$(wildcard system*))
- OBJECTS := systemMain.o systemIpc.o systemSealerWrapper.o SgxCrypto.o SgxSealer.o SgxLAInitiator.o ${sgx_protobuf_obj} ${protobuf_obj}
- SGX_SDK := /home/m2mazmud/sgx2.1_installation/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
- Uae_Library_Name := sgx_uae_service
- all: verifier ${OBJECTS}
- clean:
- ${RM} *.obj *~* ${OBJECTS} verifier
- 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 $@
- system%.o: system%.cpp
- gcc -I./include ${CXX_FLAGS} -c $^ -o $@
- verifier: systemMain.o systemIpc.o systemSealerWrapper.o SgxSealer.o SgxLAInitiator.o ${sgx_protobuf_obj} ${protobuf_obj}
- ${CXX} ${CXX_FLAGS} systemMain.o systemIpc.o systemSealerWrapper.o SgxSealer.o SgxLAInitiator.o ${sgx_protobuf_obj} -L./ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive -L$(SGX_LIBRARY_PATH) -l$(Service_Library_Name) -l$(Crypto_Library_Name) -l$(Uae_Library_Name) -lsgx_tstdc -lsgx_urts ${protobuf_obj} -lprotobuf -lsgx_tstdcxx -Wl,--verbose -o $@
|