| 1 | include ../../configure.wps |
|---|
| 2 | |
|---|
| 3 | LIBTARGET = pgu |
|---|
| 4 | EXE = ungrib.exe \ |
|---|
| 5 | g1print.exe g2print.exe |
|---|
| 6 | |
|---|
| 7 | OBJS1 = debug_cio.o module_debug.o module_stringutil.o table.o \ |
|---|
| 8 | module_datarray.o gridinfo.o new_storage.o filelist.o \ |
|---|
| 9 | ungrib.o output.o rrpr.o \ |
|---|
| 10 | rd_grib1.o file_delete.o datint.o rd_grib2.o |
|---|
| 11 | |
|---|
| 12 | OBJS2 = build_hdate.o geth_newdate.o geth_idts.o swap.o table.o \ |
|---|
| 13 | parse_table.o gbytesys.o gribcode.o read_namelist.o cio.o |
|---|
| 14 | |
|---|
| 15 | all: lib$(LIBTARGET).a $(EXE) |
|---|
| 16 | |
|---|
| 17 | ungrib.exe: $(OBJS1) lib$(LIBTARGET).a |
|---|
| 18 | $(RM) $@ |
|---|
| 19 | $(FC) -o $@ $(LDFLAGS) $(OBJS1) \ |
|---|
| 20 | -L./ngl -lw3 -lg2_4 \ |
|---|
| 21 | $(COMPRESSION_LIBS) \ |
|---|
| 22 | -L. -l$(LIBTARGET) |
|---|
| 23 | |
|---|
| 24 | lib$(LIBTARGET).a: $(OBJS2) |
|---|
| 25 | $(RM) lib$(LIBTARGET).a |
|---|
| 26 | $(AR) lib$(LIBTARGET).a $(OBJS2) |
|---|
| 27 | $(RANLIB) lib$(LIBTARGET).a |
|---|
| 28 | |
|---|
| 29 | g1print.exe: g1print.o gribcode.o module_debug.o debug_cio.o lib$(LIBTARGET).a |
|---|
| 30 | $(FC) -o $(@) $(LDFLAGS) g1print.o gribcode.o module_debug.o debug_cio.o lib$(LIBTARGET).a |
|---|
| 31 | |
|---|
| 32 | g2print.exe: filelist.o gridinfo.o g2print.o |
|---|
| 33 | $(FC) -o $(@) $(LDFLAGS) g2print.o \ |
|---|
| 34 | filelist.o gridinfo.o \ |
|---|
| 35 | -L. -l$(LIBTARGET) \ |
|---|
| 36 | -L./ngl -lw3 -lg2_4 \ |
|---|
| 37 | $(COMPRESSION_LIBS) |
|---|
| 38 | |
|---|
| 39 | g2print.o: table.o gridinfo.o new_storage.o filelist.o module_datarray.o \ |
|---|
| 40 | ngl/g2/gribmod.o ngl/g2/params.o g2print.F90 |
|---|
| 41 | $(CPP) $(CPPFLAGS) $*.F90 > $*.f |
|---|
| 42 | $(FC) -c $(FFLAGS) $*.f -I. -I./ngl/g2 |
|---|
| 43 | $(RM) $*.f |
|---|
| 44 | |
|---|
| 45 | rd_grib2.o: ngl/g2/gribmod.o module_debug.o table.o gridinfo.o ngl/g2/params.o new_storage.o \ |
|---|
| 46 | rd_grib2.F90 |
|---|
| 47 | $(CPP) $(CPPFLAGS) $*.F90 > $*.f |
|---|
| 48 | $(FC) -c $(F77FLAGS) $*.f -I. -I./ngl/g2 |
|---|
| 49 | $(RM) $*.f |
|---|
| 50 | |
|---|
| 51 | datint.o: module_debug.o gridinfo.o new_storage.o datint.F90 |
|---|
| 52 | |
|---|
| 53 | module_debug.o: debug_cio.o module_debug.F90 |
|---|
| 54 | |
|---|
| 55 | new_storage.o: gridinfo.o new_storage.F90 |
|---|
| 56 | |
|---|
| 57 | output.o: module_debug.o table.o gridinfo.o module_stringutil.o new_storage.o filelist.o output.F90 |
|---|
| 58 | |
|---|
| 59 | parse_table.o: module_debug.o table.o parse_table.F90 |
|---|
| 60 | |
|---|
| 61 | rd_grib1.o: module_debug.o table.o gridinfo.o module_datarray.o rd_grib1.F90 |
|---|
| 62 | |
|---|
| 63 | gribcode.o: module_debug.o gribcode.F90 |
|---|
| 64 | |
|---|
| 65 | rrpr.o: module_debug.o filelist.o gridinfo.o module_stringutil.o table.o new_storage.o rrpr.F90 |
|---|
| 66 | |
|---|
| 67 | read_namelist.o: module_debug.o read_namelist.F90 |
|---|
| 68 | |
|---|
| 69 | .F90.o: |
|---|
| 70 | $(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f |
|---|
| 71 | $(FC) -c $(FFLAGS) $*.f |
|---|
| 72 | $(RM) $*.f |
|---|
| 73 | |
|---|
| 74 | .f90.o: |
|---|
| 75 | $(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f |
|---|
| 76 | $(FC) -c $(FFLAGS) $*.f |
|---|
| 77 | $(RM) $*.f |
|---|
| 78 | .c.o: |
|---|
| 79 | $(RM) $@ |
|---|
| 80 | $(CC) $(CPPFLAGS) $(CFLAGS) -c $< |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | clean: |
|---|
| 84 | $(RM) *.f *.o *.i *.mod *.M lib$(LIBTARGET).a *exe |
|---|
| 85 | |
|---|
| 86 | superclean: clean |
|---|