123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- TOP_DIR = ../..
- include $(TOP_DIR)/buildenv.mk
- CFLAGS += -Werror
- CXXFLAGS += -Werror
- INCLUDE += -I$(COMMON_DIR)/inc/tlibc \
- -I$(COMMON_DIR)/inc/internal \
- -I$(COMMON_DIR)/inc
- INCLUDE += -I$(LINUX_PSW_DIR)/ae/inc \
- -I$(LINUX_PSW_DIR)/ae/inc/internal \
- -I$(LINUX_PSW_DIR)/ae/common \
- -I$(LINUX_PSW_DIR)/ae/
- INCLUDE += -I$(SGX_IPP_INC)
- INCLUDE += -I$(LINUX_SDK_DIR)/tlibstdcxx/stlport
- vpath %.cpp $(COMMON_DIR)/src:$(LINUX_PSW_DIR)/ae/common
- vpath %.edl $(COMMON_DIR)/inc
- CXXFLAGS += $(ENCLAVE_CXXFLAGS)
- SRC := $(wildcard *.cpp)
- SRC += ecp.cpp
- OBJ := $(sort $(SRC:.cpp=.o))
- EDGER8R_DIR = $(LINUX_SDK_DIR)/edger8r/linux
- EDGER8R = $(EDGER8R_DIR)/_build/Edger8r.native
- LIBNAME := libsgx_tkey_exchange.a
- .PHONY: all
- all: $(LIBNAME) | $(BUILD_DIR)
- @$(CP) $< $|
- @$(CP) sgx_tkey_exchange_t.h sgx_tkey_exchange_u.h $(COMMON_DIR)/inc/
- @$(CP) sgx_tkey_exchange_t.c sgx_tkey_exchange_u.c $(COMMON_DIR)/src/
- $(LIBNAME): $(OBJ)
- $(AR) rcsD $@ $^
- tkey_exchange.o: $(COMMON_DIR)/inc/sgx_tkey_exchange_t.h
- $(COMMON_DIR)/inc/sgx_tkey_exchange_t.h: $(COMMON_DIR)/inc/sgx_tkey_exchange.edl $(EDGER8R)
- $(EDGER8R) --search-path $(TOP_DIR)/common/inc sgx_tkey_exchange.edl
- $(EDGER8R):
- $(MAKE) -C $(EDGER8R_DIR)
- $(OBJ): %.o :%.cpp
- $(CXX) $(CXXFLAGS) $(INCLUDE) -c $< -o $@
- $(BUILD_DIR):
- @$(MKDIR) $(BUILD_DIR)
- .PHONY: clean
- clean:
- @$(RM) $(OBJ)
- @$(RM) $(LIBNAME) $(BUILD_DIR)/$(LIBNAME)
- @$(RM) $(COMMON_DIR)/inc/sgx_tkey_exchange_t.h $(COMMON_DIR)/inc/sgx_tkey_exchange_u.h
- @$(RM) $(COMMON_DIR)/src/sgx_tkey_exchange_t.c $(COMMON_DIR)/src/sgx_tkey_exchange_u.c
- @$(RM) sgx_tkey_exchange_t.* sgx_tkey_exchange_u.*
- $(MAKE) -C $(EDGER8R_DIR) clean
- .PHONY: rebuild
- rebuild:
- $(MAKE) clean
- $(MAKE) all
|