corda/sgx-jvm/linux-sgx/external/epid/Makefile
Andras Slemmer f978eab8d1 Add 'sgx-jvm/linux-sgx/' from commit '2df43c54f3a215b2fe927995c7a8869054cccf8f'
git-subtree-dir: sgx-jvm/linux-sgx
git-subtree-mainline: d52accb52c
git-subtree-split: 2df43c54f3
2017-03-13 12:18:12 +00:00

53 lines
1.5 KiB
Makefile

include ../../buildenv.mk
EPIDLIB := libepid.a
TOP_DIR := $(LINUX_EXTERNAL_DIR)/epid
CFLAGS += -fPIC
DEFINES := -DIPPEPID_USE_MERGEDLIB -DASSUME_GETOCTSTRING_POINT_VALID
ifdef DEBUG
CFLAGS += -O0
DEFINES += -DDEBUG
else
DEFINES += -DNDEBUG
endif
ifeq ($(ARCH), x86_64)
DEFINES += -DUSE_Y8_HEADER
else
DEFINES += -DUSE_P8_HEADER
endif
vpath %.c epid/common epid/common/math epid/member epid/verifier ext/ipp/sources/ippcpepid/src
INCLUDE += -I$(TOP_DIR)/ext/ipp/include \
-I$(TOP_DIR)/ext/ipp/sources/include \
-I$(TOP_DIR)/ext/ipp/sources/ippcp/src \
-I$(TOP_DIR)/ext/ipp/sources/ippcpepid/src \
-I$(TOP_DIR)
SRC := commitment.c epid2params.c errors.c grouppubkey.c memory.c printutils.c sigrlvalid.c stack.c \
bignum.c ecgroup.c finitefield.c pairing.c \
context.c nr_prove.c privkey.c signbasic.c get_sigsize.c presig.c request_join.c sign.c \
check_privrl_entry.c nrverify.c verifybasic.c context.c sigs_linked.c verify.c \
pcpgfp.c pcpgfpec.c pcpgfpecpoint.c pcpgfpecpointstuff.c pcpgfpstuff.c pcpgfpx.c pcpgfpxstuff.c
OBJ := $(SRC:.c=.o)
.PHONY: all
all: $(EPIDLIB)
$(EPIDLIB): $(OBJ)
$(AR) rcs $@ $^
%.o: %.c
$(CC) $(INCLUDE) $(filter-out -Werror, $(CFLAGS)) $(DEFINES) -c $< -o $@
.PHONY: clean
clean:
@$(RM) $(OBJ) $(EPIDLIB)
.PHONY: rebuild
rebuild: clean all