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 | MAIN = $(DOMHOME)/SOURCES/MAIN 17 | MASTER = $(MAIN)/MASTER 18 | TOOLD = $(DOMHOME)/TOOLS/TRACK_CELLS 19 | INCFILE = $(HOST)/dom.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 | TRACK_CELLSEXEC = $(OUT)/TRACK_CELLS_$(DOM_VERSION).e_$(DOM_HOSTTYPE) 44 | 45 | # 46 | # List of object files for TRACK_CELLS 47 | # -------------------------------- 48 | # 49 | 50 | TRACK_CELLS_OBJ = \ 51 | $(TOOLD)/SRC/track_cells.o \ 52 | 53 | TRACK_CELLS_CNST_OBJ = \ 54 | $(MAIN)/dom_constants.h \ 55 | 56 | # 57 | # TRACK_CELLS compilation 58 | # ------------------- 59 | 60 | all : $(TRACK_CELLSEXEC) 61 | @echo 62 | @echo "****************************************" 63 | @echo 64 | @echo " Executable created :" 65 | @echo $(TRACK_CELLSEXEC) 66 | @echo 67 | @echo "****************************************" 68 | $(RM) *.o *_m4.F *.mod dom.inc *.h 69 | 70 | 71 | $(TRACK_CELLSEXEC) : $(TRACK_CELLS_CNST_OBJ) $(TRACK_CELLS_OBJ) 72 | @echo 73 | @echo "****************************************" 74 | @echo 75 | @echo "Linking Object Files ...." 76 | @echo 77 | $(FFS) $(FFSLAGS) -o $@ $(TRACK_CELLS_OBJ) 78 | # $(MODULES).o 79 | @echo "****************************************" 80 | @echo 81 | 82 | # 83 | # dependecies by include 84 | # 85 | 86 | $(TRACK_CELLS_OBJ) : $(TRACK_CELLS_CNST_OBJ) 87 | 88 | #allmodules : $(MODULES:=.o) 89 | 90 | # 91 | # Cleaning TRACK_CELLS 92 | # 93 | 94 | clean: 95 | @echo 96 | @echo "****************************************" 97 | @echo 98 | @echo "Removing TRACK_CELLS object files" 99 | @echo 100 | $(RM) $(TOOLD)/SRC/*_m4.F 101 | $(RM) $(TOOLD)/SRC/*.o 102 | $(RM) $(MAIN)/dom_constants.h 103 | $(RM) dom.inc *.h *_m4.F *.c *.o 104 | @echo "****************************************" 105 | 106 | # 107 | # Suffix Rules: 108 | # 109 | 110 | dom.inc : $(INCFILE) 111 | @echo 112 | @echo "****************************************" 113 | @echo "Linking dom.inc" 114 | $(RM) dom.inc 115 | $(LN) $(INCFILE) . 116 | @echo "****************************************" 117 | @echo 118 | 119 | 120 | .F.o : 121 | @echo 122 | @echo "****************************************" 123 | @echo "Preprocessing " $*.F 124 | @$(M4DIR) $*.F > $*_m4.f 125 | @sed '1d' $*_m4.f > tmp_m4.f 126 | @$(MV) tmp_m4.f $*_m4.f 127 | @echo "Compiling " $*_m4.f 128 | @$(FFS) -I$(MASTER) -I$(MAIN) -c $(FFLAGS) $*_m4.f 129 | @-if [ -f $(notdir $*).mod ] ; then $(CP) $(notdir $*).mod $*.mod ; fi 130 | @$(MV) *.o $*.o 131 | @-if(test $(CLEANf) = yes) then $(RM) $*_m4.f ; fi 132 | @echo "****************************************" 133 | @echo 134 | 135 | %_m4.F : %.F dom.inc 136 | @echo 137 | @echo "****************************************" 138 | @echo 139 | @echo " Preprocessing " $*.F 140 | $(M4DIR) $*.F > $*_m4.F 141 | sed '1d' $*_m4.F > tmp_m4.F 142 | $(MV) tmp_m4.F $*_m4.F 143 | 144 | %.o : %_m4.F 145 | @echo " Compiling " $*_m4.F 146 | $(FFS) -c -I$(MASTER) -I$(MAIN) $(FFSLAGS) -o $@ $*_m4.F 147 | @echo 148 | @echo "****************************************" 149 | 150 | 151 | %.h : %.HH dom.inc 152 | @echo 153 | @echo "****************************************" 154 | @echo 155 | @echo " Preprocessing " $*.HH 156 | $(M4DIR) $*.HH > $*.h 157 | @echo 158 | @echo "****************************************" 159 | 160 | # Canceling implicit rule %.F => %.o 161 | %.o : %.F 162 |