forked from dmorgankx/optionpricing
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmakefile
46 lines (33 loc) · 980 Bytes
/
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
OSFLAG :=
MS :=
ifeq ($(shell uname),Linux)
LNK = -lrt
OSFLAG = l
OSXOPTS:=
else ifeq ($(shell uname),Darwin)
OSFLAG = m
LNK:=
OSXOPTS = -undefined dynamic_lookup -mmacosx-version-min=10.12
endif
MS = $(shell getconf LONG_BIT)
QARCH = $(OSFLAG)$(MS)
Q = $(QHOME)/$(QARCH)
all: rand.so norm.so
rand.so: rand.o mt19937arcok.o SobolSeq1024.o
gcc -shared -o rand.so rand.o mt19937arcok.o SobolSeq1024.o
rand.o: src/rand.c
gcc -DKXVER=3 -fPIC -c src/rand.c -o rand.o
mt19937arcok.o: src/mt19937arcok.c
gcc -fPIC -c src/mt19937arcok.c -o mt19937arcok.o
SobolSeq1024.o: src/SobolSeq1024.c
gcc -fPIC -c src/SobolSeq1024.c -o SobolSeq1024.o
norm.so: norm.o ndist.o
gcc -shared -o norm.so norm.o ndist.o
norm.o: src/norm.c
gcc -DKXVER=3 -fPIC -c src/norm.c -o norm.o
ndist.o: src/ndist.c
gcc -fPIC -c src/ndist.c -o ndist.o
install:
mv rand.so norm.so $(Q)
clean:
rm -f norm.o ndist.o rand.o mt19937arcok.o SobolSeq1024.o rand.so norm.so