Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. include ../../buildenv.mk
  2. EPIDLIB := libepid.a
  3. TOP_DIR := $(LINUX_EXTERNAL_DIR)/epid
  4. CFLAGS += -fPIC
  5. DEFINES := -DIPPEPID_USE_MERGEDLIB -DASSUME_GETOCTSTRING_POINT_VALID
  6. ifdef DEBUG
  7. CFLAGS += -O0
  8. DEFINES += -DDEBUG
  9. else
  10. DEFINES += -DNDEBUG
  11. endif
  12. ifeq ($(ARCH), x86_64)
  13. DEFINES += -DUSE_Y8_HEADER
  14. else
  15. DEFINES += -DUSE_P8_HEADER
  16. endif
  17. vpath %.c epid/common epid/common/math epid/member epid/verifier ext/ipp/sources/ippcpepid/src
  18. INCLUDE += -I$(TOP_DIR)/ext/ipp/include \
  19. -I$(TOP_DIR)/ext/ipp/sources/include \
  20. -I$(TOP_DIR)/ext/ipp/sources/ippcp/src \
  21. -I$(TOP_DIR)/ext/ipp/sources/ippcpepid/src \
  22. -I$(TOP_DIR)
  23. SRC := commitment.c epid2params.c errors.c grouppubkey.c memory.c printutils.c sigrlvalid.c stack.c \
  24. bignum.c ecgroup.c finitefield.c pairing.c \
  25. context.c nr_prove.c privkey.c signbasic.c get_sigsize.c presig.c request_join.c sign.c \
  26. check_privrl_entry.c nrverify.c verifybasic.c context.c sigs_linked.c verify.c \
  27. pcpgfp.c pcpgfpec.c pcpgfpecpoint.c pcpgfpecpointstuff.c pcpgfpstuff.c pcpgfpx.c pcpgfpxstuff.c
  28. OBJ := $(SRC:.c=.o)
  29. .PHONY: all
  30. all: $(EPIDLIB)
  31. $(EPIDLIB): $(OBJ)
  32. $(AR) rcs $@ $^
  33. %.o: %.c
  34. $(CC) $(INCLUDE) $(filter-out -Werror, $(CFLAGS)) $(DEFINES) -c $< -o $@
  35. .PHONY: clean
  36. clean:
  37. @$(RM) $(OBJ) $(EPIDLIB)
  38. .PHONY: rebuild
  39. rebuild: clean all