-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
51 lines (37 loc) · 1.16 KB
/
Makefile
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
42
43
44
45
46
47
48
49
50
#---------------------------------------------------------------------
# Makefile for BSGS
#
# Author : Jean-Luc PONS
SRC = SECPK1/IntGroup.cpp main.cpp SECPK1/Random.cpp \
Timer.cpp SECPK1/Int.cpp SECPK1/IntMod.cpp \
SECPK1/Point.cpp SECPK1/SECP256K1.cpp \
BSGS.cpp HashTable.cpp Thread.cpp
OBJDIR = obj
OBJET = $(addprefix $(OBJDIR)/, \
SECPK1/IntGroup.o main.o SECPK1/Random.o \
Timer.o SECPK1/Int.o SECPK1/IntMod.o \
SECPK1/Point.o SECPK1/SECP256K1.o \
BSGS.o HashTable.o Thread.o)
CXX = g++
ifdef debug
CXXFLAGS = -m64 -mssse3 -Wno-unused-result -Wno-write-strings -g -I. -I$(CUDA)/include
else
CXXFLAGS = -m64 -mssse3 -Wno-unused-result -Wno-write-strings -O2 -I. -I$(CUDA)/include
endif
LFLAGS = -lpthread
#--------------------------------------------------------------------
$(OBJDIR)/%.o : %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
all: bsgs
bsgs: $(OBJET)
@echo Making BSGS...
$(CXX) $(OBJET) $(LFLAGS) -o bsgs
$(OBJET): | $(OBJDIR) $(OBJDIR)/SECPK1
$(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJDIR)/SECPK1: $(OBJDIR)
cd $(OBJDIR) && mkdir -p SECPK1
clean:
@echo Cleaning...
@rm -f obj/*.o
@rm -f obj/SECPK1/*.o