[4728] | 1 | TEST_PROGRAMS = test_cloud_generator test_spartacus_math \ |
---|
| 2 | test_aerosol_optics_description test_random_number_generator \ |
---|
| 3 | test_fast_expm |
---|
| 4 | |
---|
| 5 | # In dependency order: |
---|
| 6 | SOURCES = ecrad_driver_read_input.F90 \ |
---|
| 7 | ecrad_driver_config.F90 |
---|
| 8 | |
---|
| 9 | OBJECTS := $(SOURCES:.F90=.o) |
---|
| 10 | EXECUTABLE = ../bin/ecrad |
---|
| 11 | IFS_EXECUTABLE = ../bin/ecrad_ifs |
---|
| 12 | IFS_BLOCKED_EXECUTABLE = ../bin/ecrad_ifs_blocked |
---|
| 13 | |
---|
| 14 | all: driver ifs_driver test_programs |
---|
| 15 | |
---|
| 16 | driver: $(EXECUTABLE) |
---|
| 17 | |
---|
| 18 | ifs_driver: $(IFS_EXECUTABLE) $(IFS_BLOCKED_EXECUTABLE) |
---|
| 19 | |
---|
| 20 | test_programs: $(TEST_PROGRAMS) |
---|
| 21 | |
---|
| 22 | $(EXECUTABLE): $(OBJECTS) ../lib/*.a ecrad_driver.o |
---|
| 23 | $(FC) $(FCFLAGS) ecrad_driver.o $(OBJECTS) $(LIBS) -o $(EXECUTABLE) |
---|
| 24 | |
---|
| 25 | $(IFS_EXECUTABLE): $(OBJECTS) ../lib/*.a ecrad_ifs_driver.o |
---|
| 26 | $(FC) $(FCFLAGS) ecrad_ifs_driver.o $(OBJECTS) -lifs $(LIBS) -o $(IFS_EXECUTABLE) |
---|
| 27 | |
---|
| 28 | $(IFS_BLOCKED_EXECUTABLE): $(OBJECTS) ../lib/*.a ecrad_ifs_driver_blocked.o |
---|
| 29 | $(FC) $(FCFLAGS) ifs_blocking.o ecrad_ifs_driver_blocked.o $(OBJECTS) -lifs $(LIBS) -o $(IFS_BLOCKED_EXECUTABLE) |
---|
| 30 | |
---|
| 31 | test_%: test_%.F90 ../lib/*.a |
---|
| 32 | $(FC) $(FCFLAGS) $< $(LIBS) -o $@ |
---|
| 33 | |
---|
| 34 | #$(TEST): $(TEST).F90 ../lib/*.a |
---|
| 35 | # $(FC) $(FCFLAGS) $(TEST).F90 $(LIBS) -o $(TEST) |
---|
| 36 | |
---|
| 37 | # Note that the dependence on mod files can mean that rerunning "make" |
---|
| 38 | # recreates the executable |
---|
| 39 | %.o: %.F90 ../lib/*.a |
---|
| 40 | $(FC) $(FCFLAGS) -c $< |
---|
| 41 | |
---|
| 42 | clean: |
---|
| 43 | rm -f *.o $(EXECUTABLE) $(IFS_EXECUTABLE) $(IFS_BLOCKED_EXECUTABLE) \ |
---|
| 44 | $(TEST_PROGRAMS) |
---|
| 45 | |
---|
| 46 | ecrad_driver.o: ecrad_driver_config.o ecrad_driver_read_input.o |
---|
| 47 | ecrad_ifs_driver.o: ecrad_driver_config.o ecrad_driver_read_input.o |
---|
| 48 | ecrad_ifs_driver_blocked.o: ecrad_driver_config.o ecrad_driver_read_input.o ifs_blocking.o |
---|
| 49 | ecrad_driver_read_input.o ifs_blocking.o: ecrad_driver_config.o |
---|
| 50 | |
---|
| 51 | .PHONY: driver ifs_driver test_programs all |
---|