-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
43 lines (31 loc) · 881 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
# Makefile for D3Q
# Adapted from TDDFPT main Makefile
SUBDIRS = src minpack/lapackified thermal2
PARADIRS = minpack/distributed
OPTDIRS = tools
default: all
ifdef SCALAPACK_LIBS
all: $(SUBDIRS)
else
all: $(SUBDIRS) $(PARADIRS)
endif
more: all $(OPTDIRS)
clean: clean_subdirs
veryclean: clean clean_examples
clean_subdirs :
for D in $(SUBDIRS) $(OPTDIRS); do \
test -d $$D && (cd $$D ; $(MAKE) $(MFLAGS) clean) \
done
clean_examples :
if test -d Examples ; then \
( cd Examples ; ./clean_all) ; fi
$(SUBDIRS) $(PARADIRS) $(OPTDIRS): FORCE
test -d $@ && (cd $@ && $(MAKE) $(MFLAGS) all)
MYNAME = $(shell basename $(CURDIR))
distrib: veryclean
( cd ..; \
rm -f d3q-latest D3Q || exit 1; \
ln -s $(MYNAME) d3q-latest; \
ln -s d3q-latest D3Q; \
tar --exclude \*.odt --exclude .svn --exclude protect -czvf $(MYNAME).tgz d3q-latest D3Q $(MYNAME) )
FORCE: