forked from peigen-sboxes/PEIGEN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefileSage
41 lines (30 loc) · 861 Bytes
/
MakefileSage
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# To build, rename this file as Makefile
# Compile inside the Sage shell: sage -sh -c make
# Then start Sage: from peigen import Lighter
# : A = Lighter()
# : A.evaluate_4bit()
# Similiar for Faster: from peigen import Faster
CC= g++
CXXFLAGS= -fopenmp -mavx2 -std=c++14 -O3 -fPIC -fwrapv -fno-strict-aliasing \
-Wall -Wextra -pedantic -g -pg \
-I$(SAGE_LOCAL)/include \
-I$(SAGE_LOCAL)/include/python2.7
LDFLAGS = -fopenmp -lm -lstdc++
OUTPUT_OPTION = -MMD -MP -o $@
-include $(DEP)
EXEC = peigen
SRC = peigen.cpp
OBJ = $(SRC:.cpp=.o)
DEP = $(SRC:.cpp=.d)
all: peigen.so
peigen.cpp: peigen.pyx peigen.pxd
cython --cplus $<
$(OBJ):$(SRC)
peigen.so: $(OBJ)
$(CC) -shared -pthread -o peigen.so $^ $(LDFLAGS)
$(EXEC): $(OBJ)
$(CC) $(LDFLAGS) $^ -o $@
clean:
rm -f $(OBJ) $(DEP) $(EXEC)
.PHONY: clean
-include $(DEP)