forked from jh000/xptMiner
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile.mingw
107 lines (92 loc) · 2.79 KB
/
Makefile.mingw
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# use this after installing mpir http://www.mpir.org/ to see if you get better performance than using gmp
#INT_LIB=mpir
CXX = g++
CC = cc
CXXFLAGS = -Wall -Wextra -std=c++0x -O2 -fomit-frame-pointer $(EXTRA_CXXFLAGS)
ifeq ($(OSVERSION),CYGWIN_NT-6.1)
#CXXFLAGS = -Wall -Wextra -std=gnu++0x -O2 -fomit-frame-pointer
CXXFLAGS = -std=gnu++0x -O2 -fomit-frame-pointer -D_BSD_SOURCE $(EXTRA_CFLAGS)
CFLAGS = -std=gnu++0x -O2 -fomit-frame-pointer -D_BSD_SOURCE $(EXTRA_CFLAGS)
endif
CFLAGS = -Wall -Wextra -O2 -fomit-frame-pointer $(EXTRA_CFLAGS)
OSVERSION := $(shell uname -s)
LIBS = -lcrypto -lssl -pthread -ldl
LIBS = -lcrypto -lssl -lwsock32 -lws2_32
ifeq ($(INT_LIB),mpir)
MPIR_DEF=-DUSE_MPIR
CFLAGS +=$(MPIR_DEF)
CXXFLAGS +=$(MPIR_DEF)
LIBS+=-lmpir
else
LIBS+=-lgmp -lgmpxx
endif
ifeq ($(OSVERSION),Linux)
# CFLAGS += -march=native
# CXXFLAGS += -march=native
endif
ifeq ($(OSVERSION),FreeBSD)
CXX = clang++
CC = clang
CFLAGS += -DHAVE_DECL_LE32DEC -march=native
CXXFLAGS += -DHAVE_DECL_LE32DEC -march=native
endif
# You might need to edit these paths too
LIBPATHS = -L/DBA/openssl/1.0.1f/lib/ -L../gmp-5.1.3/.libs
INCLUDEPATHS = -IxptMiner/includes/ -IxptMiner/OpenCL -I../gmp-5.1.3
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
ifeq ($(OSVERSION),CYGWIN_NT-6.1)
EXTENSION = .exe
# LIBS += -lOpenCL
LIBPATHS += -L/cygdrive/c/Program\ Files\ \(x86\)/AMD\ APP\ SDK/2.9/lib/x86_64/
INCLUDEPATHS += -I/cygdrive/c/Program\ Files\ \(x86\)/AMD\ APP\ SDK/2.9/include
endif
EXTENSION = .exe
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/riecoinMiner.o \
xptMiner/metiscoinMiner.o \
ifeq ($(ENABLE_OPENCL),1)
OBJS += xptMiner/OpenCLObjects.o
OBJS += xptMiner/openCL.o
OBJS += xptMiner/maxcoinMinerCL.o
CXXFLAGS += -DUSE_OPENCL
LIBS += -lOpenCL
else
OBJS += xptMiner/maxcoinMiner.o
endif
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) -static -o $@ $^ $(LIBS) -flto
clean:
-rm -f xptminer
-rm -f xptMiner/*.o
-rm -f xptMiner/jhlib/*.o