forked from jh000/xptMiner
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile_mtune
84 lines (69 loc) · 2.04 KB
/
Makefile_mtune
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
CXX = g++
CC = cc
CXXFLAGS = -Wall -Wextra -std=c++0x -O2 -fomit-frame-pointer -ffast-math -flto
CFLAGS = -Wall -Wextra -O2 -fomit-frame-pointer -ffast-math -flto
# add these for more speed! (if your cpu can do them)
#-msse2 -msse3 -mssse3 -msse4a -msse2avx -msse4a -msse4.1 -msse4.2 -mavx
OSVERSION := $(shell uname -s)
LIBS = -lcrypto -lssl -pthread -lgmp -lgmpxx
ifeq ($(OSVERSION),Linux)
LIBS += -lrt
CFLAGS += -mtune=native
CXXFLAGS += -mtune=native
endif
ifeq ($(OSVERSION),FreeBSD)
CXX = clang++
CC = clang
CFLAGS += -DHAVE_DECL_LE32DEC -mtune=native
CXXFLAGS += -DHAVE_DECL_LE32DEC -mtune=native
endif
# You might need to edit these paths too
LIBPATHS = -L/usr/local/lib -L/usr/lib
INCLUDEPATHS = -I/usr/local/include -I/usr/include -IxptMiner/includes/ -IxptMiner/OpenCL
ifeq ($(OSVERSION),Darwin)
EXTENSION = -mac
GOT_MACPORTS := $(shell which port)
ifdef GOT_MACPORTS
LIBPATHS += -L/opt/local/lib
INCLUDEPATHS += -I/opt/local/include
endif
else
EXTENSION =
endif
JHLIB = xptMiner/jhlib.o \
OBJS = \
xptMiner/ticker.o \
xptMiner/main.o \
xptMiner/sha2.o \
xptMiner/xptClient.o \
xptMiner/protosharesMiner.o \
xptMiner/primecoinMiner.o \
xptMiner/keccak.o \
xptMiner/metis.o \
xptMiner/shavite.o \
xptMiner/scrypt.o \
xptMiner/scryptMinerCPU.o \
xptMiner/xptClientPacketHandler.o \
xptMiner/xptPacketbuffer.o \
xptMiner/xptServer.o \
xptMiner/xptServerPacketHandler.o \
xptMiner/transaction.o \
xptMiner/maxcoinMiner.o \
xptMiner/riecoinMiner.o \
xptMiner/metiscoinMiner.o \
xptMiner/win.o
# xptMiner/maxcoinMinerCL.o \
# xptMiner/OpenCLObjects.o \
# xptMiner/openCL.o \
# xptMiner/keccak.o \
all: xptminer$(EXTENSION)
xptMiner/%.o: xptMiner/%.cpp
$(CXX) -c $(CXXFLAGS) $(INCLUDEPATHS) $< -o $@
xptMiner/%.o: xptMiner/%.c
$(CC) -c $(CFLAGS) $(INCLUDEPATHS) $< -o $@
xptminer$(EXTENSION): $(OBJS:xptMiner/%=xptMiner/%) $(JHLIB:xptMiner/jhlib/%=xptMiner/jhlib/%)
$(CXX) $(CFLAGS) $(LIBPATHS) $(INCLUDEPATHS) -o $@ $^ $(LIBS) -flto
clean:
-rm -f xptminer
-rm -f xptMiner/*.o
-rm -f xptMiner/jhlib/*.o