|
63 | 63 | BLAS_LIB ?= -lrefblas |
64 | 64 | endif |
65 | 65 |
|
66 | | -# Optional: DIFFSIZES_access when using ISIZE globals (.f or .f90+wrappers when many vars) |
| 66 | +# Optional: DIFFSIZES_access when using ISIZE globals (run_tapenade_blas.py writes .f or .f90+wrappers) |
| 67 | +# When many ISIZE vars exceed F77 COMMON line limit, generator writes DIFFSIZES_access.f90 + wrappers instead of .f |
67 | 68 | # Prefer .f90 when present (may have more vars than stale .f) |
68 | 69 | # Must be defined before any rule that uses it as a prerequisite, so "make forward" (etc.) builds it first. |
69 | 70 | ifneq ($(wildcard $(SRC_DIR)/DIFFSIZES_access.f90),) |
@@ -169,15 +170,19 @@ $(BUILD_DIR)/%_dep2.o: $(SRC_DIR)/%_dep2.f |
169 | 170 | $(FC) $(FFLAGS_F77) -c $< -o $@ |
170 | 171 |
|
171 | 172 | # DIFFSIZES_access - F77 .f or F90 .f90 (generator picks based on COMMON line length) |
172 | | -# When .f90 exists: compile to produce .o and .mod; wrappers need .mod (depend on it explicitly) |
| 173 | +# When .f90 exists: compile to produce .o and .mod; wrappers depend on .mod explicitly (avoids stale .o from .f) |
173 | 174 | $(BUILD_DIR)/diffsizes_access.mod: $(SRC_DIR)/DIFFSIZES_access.f90 |
174 | 175 | $(FC) $(FFLAGS) -J$(BUILD_DIR) -c $< -o $(BUILD_DIR)/DIFFSIZES_access.o |
175 | 176 |
|
| 177 | +# When .f90 exists: DIFFSIZES_access.o is produced as byproduct of diffsizes_access.mod (do not compile .f) |
| 178 | +ifeq ($(wildcard $(SRC_DIR)/DIFFSIZES_access.f90),) |
176 | 179 | $(BUILD_DIR)/DIFFSIZES_access.o: $(SRC_DIR)/DIFFSIZES_access.f |
177 | 180 | $(FC) $(FFLAGS_F77) -c $< -o $@ |
| 181 | +else |
| 182 | +$(BUILD_DIR)/DIFFSIZES_access.o: $(BUILD_DIR)/diffsizes_access.mod |
| 183 | +endif |
178 | 184 |
|
179 | 185 | # DIFFSIZES_access_wrappers.f - external symbols for F90 module (set_*, get_*, check_*) |
180 | | -# Depend on .mod so we always build from .f90 when using F90 path (avoids stale .o from .f) |
181 | 186 | $(BUILD_DIR)/DIFFSIZES_access_wrappers.o: $(SRC_DIR)/DIFFSIZES_access_wrappers.f $(BUILD_DIR)/diffsizes_access.mod |
182 | 187 | $(FC) $(FFLAGS) -J$(BUILD_DIR) -c $(SRC_DIR)/DIFFSIZES_access_wrappers.f -o $@ |
183 | 188 |
|
|
0 commit comments