1 | include $(DOMHOME)/HOSTS/$(DOM_HOSTTYPE)/makefile.h 2 | 3 | # 4 | # Version and outpath 5 | # ------------------- 6 | # 7 | 8 | HOST = $(DOMHOME)/HOSTS/$(DOM_HOSTTYPE) 9 | OUT = $(HOST) 10 | 11 | # 12 | # Sources directories 13 | # ------------------- 14 | # 15 | 16 | CONST = $(DOMHOME)/SOURCES/MAIN 17 | TOOLD = $(DOMHOME)/TOOLS/SOLINIT_INTERP1D 18 | INCFILE = $(HOST)/dom.inc 19 | PERSO = $(DOMHOME)/TOOLS/INCLUDE/perso.inc 20 | 21 | # 22 | # Quiet mode 23 | # 24 | .SILENT : 25 | 26 | # 27 | # Suffixes 28 | # -------- 29 | 30 | .SUFFIXES:.o .F .HH .h 31 | 32 | # 33 | # Intermediate files to keep 34 | # -------------------------- 35 | 36 | .PRECIOUS : %.o %_m4.f %.mod %.h 37 | 38 | # 39 | # Executable files 40 | # ---------------- 41 | # 42 | 43 | SOLINIT_INTERP1DEXEC = $(OUT)/solinit_interp1D_$(DOM_VERSION).e_$(DOM_HOSTTYPE) 44 | 45 | # 46 | # List of object files for SOLINIT_INTERP1D 47 | # -------------------------------- 48 | # 49 | 50 | SOLINIT_INTERP1D_OBJ = \ 51 | $(TOOLD)/SRC/solinit_interp1D.o 52 | 53 | SOLINIT_INTERP1D_CNST_OBJ = \ 54 | $(CONST)/dom_constants.h 55 | 56 | # 57 | # SOLINIT_INTERP1D compilation 58 | # ------------------- 59 | 60 | all : $(SOLINIT_INTERP1DEXEC) 61 | @echo 62 | @echo "****************************************" 63 | @echo 64 | @echo " Executable created :" 65 | @echo $(SOLINIT_INTERP1DEXEC) 66 | @echo 67 | @echo "****************************************" 68 | $(RM) *.o *_m4.f *.mod dom.inc *.h 69 | 70 | 71 | 72 | $(SOLINIT_INTERP1DEXEC) : $(SOLINIT_INTERP1D_CNST_OBJ) $(SOLINIT_INTERP1D_OBJ) 73 | @echo 74 | @echo "****************************************" 75 | @echo 76 | @echo "Linking Object Files ...." 77 | @echo 78 | $(FFS) $(LDFLAGS) -o $(SOLINIT_INTERP1DEXEC) $(SOLINIT_INTERP1D_OBJ) 79 | @echo "****************************************" 80 | @echo 81 | 82 | # 83 | # dependecies by include 84 | # 85 | 86 | $(SOLINIT_INTERP1D_OBJ) : $(SOLINIT_INTERP1D_CNST_OBJ) 87 | 88 | # 89 | # Cleaning SOLINIT_INTERP1D 90 | # 91 | 92 | clean: 93 | @echo 94 | @echo "****************************************" 95 | @echo 96 | @echo "Removing SOLINIT_INTERP1D object files" 97 | @echo 98 | $(RM) $(TOOLD)/SRC/*_m4.f 99 | $(RM) $(TOOLD)/SRC/*.o 100 | $(RM) $(CONST)/dom_constants.h 101 | $(RM) dom.inc *.h *_m4.f *.c *.o 102 | @echo "****************************************" 103 | 104 | # 105 | # Suffix Rules: 106 | # 107 | 108 | dom.inc : $(INCFILE) 109 | @echo 110 | @echo "****************************************" 111 | @echo "Linking dom.inc" 112 | $(RM) dom.inc 113 | $(LN) $(INCFILE) . 114 | @echo "****************************************" 115 | @echo 116 | 117 | perso.inc : $(PERSO) 118 | @echo "****************************************" 119 | @echo "Linking perso.inc" 120 | @$(RM) perso.inc 121 | @$(LN) $(PERSO) . 122 | @echo "****************************************" 123 | 124 | %_m4.f : %.F dom.inc perso.inc 125 | @echo 126 | @echo "****************************************" 127 | @echo 128 | @echo " Preprocessing " $*.F 129 | $(M4DIR) $*.F > $*_m4.f 130 | sed '1d' $*_m4.f > tmp_m4.f 131 | $(MV) tmp_m4.f $*_m4.f 132 | 133 | %.o : %_m4.f 134 | @echo " Compiling " $*_m4.f 135 | $(FFS) -c -I$(CONST) $(FFSLAGS) -o $@ $*_m4.f 136 | @echo 137 | @echo "****************************************" 138 | 139 | 140 | %.h : %.HH dom.inc 141 | @echo 142 | @echo "****************************************" 143 | @echo 144 | @echo " Preprocessing " $*.HH 145 | $(M4DIR) $*.HH > $*.h 146 | @echo 147 | @echo "****************************************" 148 | 149 | # Canceling implicit rule %.F => %.o 150 | %.o : %.F 151 |