-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (47 loc) · 1.64 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
51
52
53
54
55
56
57
58
59
60
61
62
BASEDIR = $(CURDIR)
include make.inc
.PHONY: all nlcpy_ve_common nlcpy_ve_no_fast_math nlcpy_ve_fast_math FORCE
ifeq ($(JOBS),)
JOBS:=$(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
JOBS:=$(shell if [ $(JOBS) -le 16 ]; then echo "8"; elif [ $(JOBS) -le 32 ]; then echo "16"; else echo "32"; fi)
endif
ifeq ($(FTRACE),yes)
else
FTRACE=no
endif
all: make.dep nlcpy_ve_common nlcpy_ve_no_fast_math nlcpy_ve_fast_math
cp $(SRCDIR)/*.h $(BASEDIR)/nlcpy/include/
make.dep: $(OBJDIR_COMMON) $(OBJDIR_NO_FAST_MATH) $(OBJDIR_FAST_MATH)
cd $(OBJDIR_COMMON) && sh $(TOOLDIR)/make_dep.sh
cd $(OBJDIR_NO_FAST_MATH) && sh $(TOOLDIR)/make_dep.sh
cd $(OBJDIR_FAST_MATH) && sh $(TOOLDIR)/make_dep.sh
nlcpy_ve_common:
cd $(OBJDIR_COMMON) && make -f Makefile perl
cd $(OBJDIR_COMMON) && make -j$(JOBS) -f Makefile COMMON=yes FTRACE=$(FTRACE)
nlcpy_ve_no_fast_math: nlcpy_ve_common
cd $(OBJDIR_NO_FAST_MATH) && make -f Makefile perl
cd $(OBJDIR_NO_FAST_MATH) && make -j$(JOBS) -f Makefile FTRACE=$(FTRACE)
nlcpy_ve_fast_math: nlcpy_ve_common
cd $(OBJDIR_FAST_MATH) && make -f Makefile FAST_MATH=yes perl
cd $(OBJDIR_FAST_MATH) && make -j$(JOBS) -f Makefile FAST_MATH=yes
# cd $(OBJDIR_FAST_MATH) && make -j$(JOBS) -f Makefile FAST_MATH=yes FTRACE=yes
$(OBJDIR_COMMON): FORCE
mkdir -p $@
cd $(SRCDIR) && $(CPIO) $@
$(OBJDIR_NO_FAST_MATH): FORCE
mkdir -p $@
cd $(SRCDIR) && $(CPIO) $@
$(OBJDIR_FAST_MATH): FORCE
mkdir -p $@
cd $(SRCDIR) && $(CPIO) $@
clean:
sh scripts/clean.sh $(BASEDIR)
rm -rf obj/
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf .tox
rm -rf nlcpy/include/*.h
rm -rf nlcpy/lib/*.so
clean_cython:
sh scripts/clean.sh $(BASEDIR)