-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
103 lines (85 loc) · 2.85 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
94
95
96
97
98
99
100
101
102
103
PREFIX ?= /usr/local
.PHONY: install
default :
@echo 'to install, type at the shell prompt:'
@echo ' ./configure'
@echo ' make all'
@echo ' make install'
all : kcp pp
kcp : bindir mods libs libiotk afclib
if test -d CPV ; then \
( cd CPV ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= kcp ; \
else $(MAKE) $(MFLAGS) TLDEPS= kcp ; fi ) ; fi
pp : bindir mods libs libiotk
if test -d PP ; then \
( cd PP ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
else $(MAKE) $(MFLAGS) TLDEPS= all ; fi ) ; fi
libiotk :
if test -d iotk ; then \
( cd iotk ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= lib+util ; \
else $(MAKE) $(MFLAGS) TLDEPS= lib+util ; fi ) ; fi
mods : libiotk
( cd Modules ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
else $(MAKE) $(MFLAGS) TLDEPS= all ; fi )
afclib:
( if test -d AFC90/src; then cd AFC90/src ; \
if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= libafc90.a ;\
else $(MAKE) $(MFLAGS) TLDEPS= libafc90.a ; fi; fi )
libs : mods
( cd clib ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
else $(MAKE) $(MFLAGS) TLDEPS= all ; fi )
( cd flib ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
else $(MAKE) $(MFLAGS) TLDEPS= all ; fi )
bindir :
test -d bin || mkdir bin
# remove object files and executables
clean :
touch make.sys
for dir in \
CPV PP Modules clib flib iotk AFC90 \
; do \
if test -d $$dir ; then \
( cd $$dir ; \
if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= clean ; \
else $(MAKE) $(MFLAGS) TLDEPS= clean ; fi ) \
fi \
done
- /bin/rm -rf bin/*.x tmp
#- cd tests; /bin/rm -rf CRASH *.out *.out2
# remove configuration files too
distclean veryclean : clean
- /bin/rm -rf make.sys \
config.log configure.msg config.status autom4te.cache \
espresso.tar.gz Modules/version.h ChangeLog* \
intel.pcl */intel.pcl
- if test -d GUI ; then \
( cd GUI ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= veryclean ; \
else $(MAKE) $(MFLAGS) TLDEPS= veryclean ; fi ) \
fi
tar :
@if test -f espresso.tar.gz ; then /bin/rm espresso.tar.gz ; fi
# do not include unneeded stuff
find ./ -type f | grep -v -e /CVS/ -e /results/ -e'/\.' -e'\.o$$' \
-e'\.mod$$' -e'\.a$$' -e'\.d$$' -e'\.i$$' -e'\.F90$$' -e'\.x$$' \
-e'~$$' -e'\./GUI' | xargs tar rvf espresso.tar
gzip espresso.tar
links : bindir
( cd bin/ ; \
for exe in \
../CPV/kcp.x \
../CPV/cppp.x \
; do \
if test -f $$exe ; then ln -fs $$exe . ; fi \
done \
)
depend:
@echo 'Checking dependencies...'
- ( if test -x ./makedeps.sh ; then ./makedeps.sh ; fi)
install:
mkdir -p $(PREFIX)/bin ; \
for x in `find . -name *.x -type f` ; do \
cp -v $$x $(PREFIX)/bin/ ; done
@echo -e '\nkoopmans-kcp binaries are installed in $(PREFIX)/bin\n'
check:
( cd tests/ ; make run-tests )
# DO NOT DELETE