forked from sibidanov/ranluxpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 919 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 919 Bytes
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
CXX = g++
CXXFLAGS = -O3 -Iinc -mavx2
RLIB = libranlux++.a
# use assembly optimized version of the skipping
ASMSKIP = yes
ifeq ($(ASMSKIP),yes)
CXXFLAGS += -DASMSKIP
ASMOBJ = src/skipstates.o
endif
all: ranluxpp_test ranlux_test std_random_test
%.o: %.asm
$(AS) -c -o $@ $<
%.o: %.cxx
$(CXX) -c -o $@ $< $(CXXFLAGS)
$(RLIB): src/ranluxpp.o src/mulmod.o src/mul9x9mod.o src/divmult.o src/lcg2ranlux.o src/ranlux.o src/cpuarch.o $(ASMOBJ)
ar cru $@ $^
ranlux_test: tests/ranlux_test.cxx $(RLIB)
$(CXX) -o $@ $^ $(CXXFLAGS)
ranluxpp_test: tests/ranluxpp_test.cxx $(RLIB)
$(CXX) -o $@ $^ $(CXXFLAGS)
std_random_test: tests/std_random_test.cxx
$(CXX) -o $@ $^ $(CXXFLAGS)
.PHONY: clean
clean:
rm -f ranlux_test ranluxpp_test std_random_test src/*.o src/*~ tests/*~ inc/*~ core *~ $(RLIB)
src/ranlux.o: inc/ranlux.h
src/ranluxpp.o: inc/ranluxpp.h
src/mulmod.o: inc/mulmod.h
src/cpuarch.o: inc/cpuarch.h