consider arm linux

dev
MITSUNARI Shigeo 9 years ago
parent c625f89baa
commit 85d15c3d1f
  1. 2
      Makefile
  2. 21
      common.mk

@ -14,7 +14,7 @@ SAMPLE_SRC=bench.cpp ecdh.cpp random.cpp rawbench.cpp vote.cpp pairing.cpp
MCL_LIB=$(LIB_DIR)/libmcl.a
all: $(MCL_LIB)
LLVM_VER=-3.8
#LLVM_VER=-3.8
LLVM_LLC=llc$(LLVM_VER)
LLVM_OPT=opt$(LLVM_VER)
GEN_EXE=src/gen

@ -9,9 +9,11 @@ endif
BIT?=64
ifeq ($(BIT),32)
CPU?=x86
BIT_OPT=-m32
else
ifeq ($(BIT),64)
CPU?=x86-64
BIT_OPT=-m64
endif
endif
@ -34,20 +36,15 @@ ifneq ($(DEBUG),1)
endif
endif
ifeq ($(MARCH),)
ifeq ($(shell expr $(GCC_VER) \> 4.2.1),1)
CFLAGS_OPT+=-march=native
endif
ifeq (,$(findstring x86,$(CPU)))
CFLAGS_OPT+=-march=native
endif
else
CFLAGS_OPT+=$(MARCH)
endif
endif
CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith
CFLAGS+= -g3
ifeq ($(BIT),0)
BIT_OPT=
else
BIT_OPT=-m$(BIT)
endif
CFLAGS+=-g3
INC_OPT=-I include -I test -I ../xbyak -I ../cybozulib/include
CFLAGS+=$(CFLAGS_WARN) $(BIT_OPT) $(INC_OPT) $(CFLAGS_USER)
DEBUG=0
@ -56,5 +53,9 @@ CFLAGS+=$(CFLAGS_OPT)
endif
LDFLAGS+=-lgmp -lgmpxx -lcrypto $(BIT_OPT) $(LDFLAGS_USER)
CFLAGS += -DMCL_USE_LLVM -fPIC
CFLAGS+=-fPIC
USE_LLVM?=1
ifeq ($(USE_LLVM),1)
CFLAGS+=-DMCL_USE_LLVM
endif

Loading…
Cancel
Save