corda/external/sgx_libm/makefile
Angie Chinchilla 9441de4c38 Initial release of Intel SGX for Linux.
This release is used in conjunction with the linux-sgx-driver Intial release:
https://github.com/01org/linux-sgx-driver
commit-id: 0e865ce5e6b297a787bcdc12d98bada8174be6d7

Intel-id: 33399

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
2016-06-23 18:51:53 -04:00

26 lines
480 B
Makefile

ARCH ?= intel64
.PHONE: lib clean
all: lib
cp $(ARCH)/libm.a libm.a
ifeq ($(ARCH),ia32)
CFLAGS := -m32
endif
SRC_FILES := $(wildcard $(ARCH)/*.S)
OBJ_FILES := $(SRC_FILES:.S=.o)
STATIC_LIB:= $(ARCH)/libm.a
SHARED_LIB:= $(ARCH)/libm.so
lib : $(STATIC_LIB) $(SHARED_LIB)
%.o : %.S
gcc $(CFLAGS) -c $< -o $@
$(STATIC_LIB) : $(OBJ_FILES)
ar crv $@ $^
$(SHARED_LIB) : $(OBJ_FILES)
gcc $(CFLAGS) -shared -o $@ $^
clean:
-rm -rf $(OBJ_FILES) $(STATIC_LIB) $(SHARED_LIB) libm.a