forked from herumi/mcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.cross
26 lines (20 loc) · 951 Bytes
/
Makefile.cross
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
include common.mk
LIB_DIR=lib
OBJ_DIR=obj
EXE_DIR=bin
SRC_SRC=fp.cpp bn_c384_256.cpp
VPATH=src
MCL_LIB=$(LIB_DIR)/libmclbn384_256.a
LIB_OBJ=$(addprefix $(OBJ_DIR)/,$(SRC_SRC:.cpp=.o) bint.o base.o)
CFLAGS=-std=c++03 -I ./include -I ./src
CFLAGS+=-fno-threadsafe-statics -fno-exceptions -fno-rtti -DMCL_MAX_BIT_SIZE=384 -DCYBOZU_DONT_USE_STRING -DCYBOZU_DONT_USE_EXCEPTION -DNDEBUG
CFLAGS+=-target $(TARGET) $(TARGET_OPT)
CXX=$(PRE)clang++$(LLVM_VER)
$(MCL_LIB): $(LIB_OBJ)
$(AR) $(ARFLAGS) $@ $(LIB_OBJ)
$(OBJ_DIR)/%.o: %.cpp
$(CXX) -c $< -o $@ $(CFLAGS)
$(OBJ_DIR)/bint.o: src/bint$(BIT).ll
$(CXX) -c $< -o $@ $(CFLAGS)
$(OBJ_DIR)/base.o: src/base$(BIT).ll
$(CXX) -c $< -o $@ $(CFLAGS)