1 Star 0 Fork 2

shazi4399/sm2-psi

forked from zhaolaiwang1/sm2-psi 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
zhaolaiwang1 提交于 2022-07-16 13:13 . update readme
BIN=bin
SRC=src
# compiler settings
CC=g++
#COMPILER_OPTIONS=-O2
COMPILER_OPTIONS=-g3 -O2 #-shared -fPIC #-mavx -maes -mpclmul -DRDTSC -DTEST=AES128
DEBUG_OPTIONS=-g3 -ggdb #-Wall -Wextra
BATCH=
ARCHITECTURE = $(shell uname -m)
ifeq (${ARCHITECTURE},x86_64)
GNU_LIB_PATH:=x86_64
else
GNU_LIB_PATH:=i386
endif
INCLUDE=-I.. -I/usr/include/glib-2.0/ -I/usr/lib/${GNU_LIB_PATH}-linux-gnu/glib-2.0/include `pkg-config --cflags glib-2.0`
LIBRARIES= -lpthread -L /usr/lib -lippcp -lglib-2.0 `pkg-config --libs glib-2.0`
CFLAGS=
# all source files and corresponding object files
SOURCES_CORE := $(shell find ${CORE} -type f -name '*.cpp' -a -not -path '*/mains/*')
OBJECTS_CORE := $(SOURCES_CORE:.cpp=.o)
# directory for PSI related sources
SOURCES_UTIL=${SRC}/util/*.cpp
OBJECTS_UTIL=${SRC}/util/*.o
SOURCE_BIGN=${SRC}/util/bigNum/*.cpp
OBJECTS_BIGN=${SRC}/util/bigNum/*.o
SOURCE_CRYPT=${SRC}/util/gmCrypto/*.cpp
OBJECTS_CRYPT=${SRC}/util/gmCrypto/*.o
# public-key-based PSI
SOURCES_DHPSI=${SRC}/ecdh-psi/*.cpp
OBJECTS_DHPSI=${SRC}/ecdh-psi/*.o
all: core demo lib
@echo "make all done."
core: ${OBJECTS_CORE}
%.o:%.cpp %.h
${CC} $< ${COMPILER_OPTIONS} ${DEBUG_OPTIONS} -c ${INCLUDE} ${LIBRARIES} ${CFLAGS} ${BATCH} -o $@
demo:
${CC} -o psi.out ${SRC}/mains/psi_demo.cpp ${OBJECTS_DHPSI} ${OBJECTS_UTIL} ${CFLAGS} ${DEBUG_OPTIONS} ${LIBRARIES} ${OBJECTS_BIGN} ${OBJECTS_CRYPT} ${INCLUDE} ${COMPILER_OPTIONS}
lib:
#${CC} -o libpsi.so ${OBJECTS_DHPSI} ${OBJECTS_UTIL} ${CFLAGS} ${DEBUG_OPTIONS} ${LIBRARIES} ${OBJECTS_BIGN} ${OBJECTS_CRYPT} ${INCLUDE} ${COMPILER_OPTIONS}
# only clean example objects, test object and binaries
clean:
rm -f *.so *.a ${OBJECTS_EXAMPLE} ${OBJECTS_TEST} *.exe ${OBJECTS_DHPSI} ${OBJECTS_UTIL} ${OBJECTS_CRYPT} ${OBJECTS_BIGN}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/shazi4399/sm2-psi.git
git@gitee.com:shazi4399/sm2-psi.git
shazi4399
sm2-psi
sm2-psi
master

搜索帮助