-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
executable file
·93 lines (80 loc) · 2.09 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
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
# Source Code Diectories
SIM_DIR = libs/simulator
SPARSE_DIR = libs/superlu
BLAS_DIR = libs/netlib/blas
LAPACK_DIR = libs/netlib/lapack
TOMS_DIR = libs/netlib/toms
CEPHES_DIR = libs/netlib/cephes
CALC_DIR = libs/calculon
LOG_DIR = libs/log
DATA_DIR = libs/data
# Quiet (set to @ for a quite compile)
Q ?= @
#Q ?=
# Build Tools
CROSS ?=
CC := $(CROSS)gcc
AR := $(CROSS)ar
RANLIB := $(CROSS)ranlib
OBJDUMP := $(CROSS)objdump
ifeq ($(OS), Windows_NT)
EISPICE = _eispice.pyd
PYFLAG = -c mingw32
else
EISPICE = eispice.so
endif
.PHONY: all clean distclean install windist uninstall libs
all: Makefile $(EISPICE)
$(EISPICE):
@echo Building Module
$(Q)python setup.py build $(PYFLAG)
$(Q)cp build/*/simulator_.so module/
$(Q)rm -fdr build
libs:
@echo Building Libraries...
$(Q)(cd $(LOG_DIR); $(MAKE) install)
$(Q)(cd $(DATA_DIR); $(MAKE) install)
$(Q)(cd $(BLAS_DIR); $(MAKE) install)
$(Q)(cd $(TOMS_DIR); $(MAKE) install)
$(Q)(cd $(CEPHES_DIR); $(MAKE) install)
$(Q)(cd $(LAPACK_DIR); $(MAKE) install)
$(Q)(cd $(SPARSE_DIR); $(MAKE) install)
$(Q)(cd $(CALC_DIR); $(MAKE) install)
$(Q)(cd $(SIM_DIR); $(MAKE) install)
distclean:
@echo Cleaning...
$(Q)(cd $(DATA_DIR); $(MAKE) clean)
$(Q)(cd $(BLAS_DIR); $(MAKE) clean)
$(Q)(cd $(TOMS_DIR); $(MAKE) clean)
$(Q)(cd $(CEPHES_DIR); $(MAKE) clean)
$(Q)(cd $(LAPACK_DIR); $(MAKE) clean)
$(Q)(cd $(SPARSE_DIR); $(MAKE) clean)
$(Q)(cd $(CALC_DIR); $(MAKE) clean)
$(Q)(cd $(SIM_DIR); $(MAKE) clean)
$(Q)rm -vf libs/*.a
$(Q)rm -vf include/*
$(Q)rm -vf *~ */*~ */*/*~
$(Q)rm -vf *.stackdump */*.stackdump
$(Q)rm -vf ./module/*.o
$(Q)rm -vf ./module/*.pyc
$(Q)rm -vf ./eispice.dll
$(Q)rm -fdr ./build
clean:
@echo Cleaning...
$(Q)rm -vf *~ */*~ */*/*~
$(Q)rm -vf ./module/*.o
$(Q)rm -vf ./module/simulator_.dll
$(Q)rm -vf ./module/simulator_.so
uninstall:
@echo Un-Installing
$(Q)python uninstall.py
install: uninstall
@echo Installing
$(Q)python setup.py build $(PYFLAG) install
$(Q)rm -fdr ./build
windist: $(LIBS)
@echo Installing
$(Q)python setup.py build $(PYFLAG) bdist_wininst
$(Q)cp ./dist/* .
$(Q)rm -fdr ./build
$(Q)rm -fdr ./dist