forked from geodynamics/Rayleigh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (60 loc) · 1.97 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
include make.inc
SRC=src
BUILD=$(SRC)/build
# make the CUSTOMROOT variable available to sub-make processes
export CUSTOMROOT
rayleigh:
@mkdir -p $(BUILD)/compiled
@cp $(SRC)/Parallel_Framework/*.F90 $(BUILD)/.
@cp $(SRC)/Data_Structures/*.F90 $(BUILD)/.
@cp $(SRC)/Math_Layer/*.F90 $(BUILD)/.
@cp $(SRC)/Plugins/*.F90 $(BUILD)/.
@cp $(SRC)/IO/*.F90 $(BUILD)/.
@cp $(SRC)/Test_Suite/*.F90 $(BUILD)/.
@cp $(SRC)/Physics/*.F90 $(BUILD)/.
@cp $(SRC)/Diagnostics/*.F90 $(BUILD)/.
@cp $(SRC)/Diagnostics/*.F $(BUILD)/.
@cp $(SRC)/Utility/*.F90 $(BUILD)/.
@cp $(SRC)/Utility/*.c $(BUILD)/.
@cp $(SRC)/Include/*.F $(BUILD)/.
@cp $(SRC)/Makefile $(BUILD)/.
@cp $(SRC)/object_list $(BUILD)/.
ifeq ($(NODIRS),1)
cp $(SRC)/Utility/MakeDir.F90_IBM $(BUILD)/MakeDir.F90
endif
ifdef CUSTOMROOT
@echo Custom directory specified.
@echo Any files from $(CUSTOMROOT) will overwrite standard Rayleigh source files.
@cp $(CUSTOMROOT)/* $(BUILD)/. 2>/dev/null || :
endif
@$(MAKE) --no-print-directory --directory=$(BUILD) clean_exec
@$(MAKE) --no-print-directory --directory=$(BUILD) all
@echo ""
@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@echo "Compilation is complete."
@echo " "
@echo " "
@echo "Run 'make install' to install the rayleigh executables into: "
@echo $(PREFIX)"/bin"
@echo ""
clean:
@$(MAKE) --no-print-directory --directory=$(BUILD) clean_exec
@$(MAKE) --no-print-directory --directory=$(BUILD) clean
install:
@echo "Installing executables into: " $(PREFIX)"/bin"
@mkdir -p $(PREFIX)/bin
@cp $(BUILD)/compiled/rayleigh.* $(PREFIX)/bin/.
distclean:
rm -f $(BUILD)/compiled/rayleigh.*
rm -f $(BUILD)/*.F
rm -f $(BUILD)/*.F90
rm -f $(BUILD)/*.c
rm -f $(BUILD)/*.o
rm -f $(BUILD)/*.mod
rm -f $(BUILD)/object_list
rm -f $(BUILD)/Makefile
rm -f $(BUILD)/Machine_Definitions
rm -f $(BUILD)/machine.no_comments
@rm -f $(PREFIX)/rayleigh.*
@rm -f make.inc
@echo "#Following configure, this file contains the definition of the PREFIX variable" >> make.inc