makefile 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. #!/bin/csh
  2. #
  3. # Makefile for interpolation code
  4. #
  5. # CVS:$Id: makefile,v 1.7 2000/04/19 21:46:44 pwjones Exp $
  6. #
  7. COMPILE = gfortran
  8. FLAGS = -O3 -I/usr/include -L/usr/lib
  9. LIB = -lnetcdf -lnetcdff
  10. INCLUDE =
  11. SRCDIR = .
  12. EXEDIR = ..
  13. OBJSET = \
  14. kinds_mod.o \
  15. constants.o \
  16. iounits.o \
  17. netcdf.o \
  18. grids.o \
  19. remap_vars.o \
  20. remap_distwgt.o \
  21. remap_conserv.o \
  22. remap_bilinear.o \
  23. remap_bicubic.o \
  24. timers.o \
  25. remap_write.o \
  26. scrip.o
  27. OBJTEST = \
  28. kinds_mod.o \
  29. constants.o \
  30. iounits.o \
  31. netcdf.o \
  32. grids.o \
  33. timers.o \
  34. remap_vars.o \
  35. remap_read.o \
  36. read_input_file.o \
  37. remap.o
  38. all: $(EXEDIR)/scrip $(EXEDIR)/scrip_test $(EXEDIR)/scrip_use $(EXEDIR)/scrip_use_extrap
  39. $(EXEDIR)/scrip: $(OBJSET)
  40. $(COMPILE) $(FLAGS) $(OBJSET) $(LIB) -o $(EXEDIR)/scrip
  41. $(EXEDIR)/scrip_test: $(OBJTEST) scrip_test.o
  42. $(COMPILE) $(FLAGS) $(OBJTEST) scrip_test.o $(LIB) \
  43. -o $(EXEDIR)/scrip_test
  44. $(EXEDIR)/scrip_use: $(OBJTEST) scrip_use.o
  45. $(COMPILE) $(FLAGS) $(OBJTEST) scrip_use.o $(LIB) \
  46. -o $(EXEDIR)/scrip_use
  47. $(EXEDIR)/scrip_use_extrap: $(OBJTEST) scrip_use_extrap.o
  48. $(COMPILE) $(FLAGS) $(OBJTEST) scrip_use_extrap.o $(LIB) \
  49. -o $(EXEDIR)/scrip_use_extrap
  50. kinds_mod.o: $(SRCDIR)/kinds_mod.f $(INCLUDE)
  51. $(COMPILE) $(FLAGS) -c $(SRCDIR)/kinds_mod.f
  52. constants.o: $(SRCDIR)/constants.f kinds_mod.o $(INCLUDE)
  53. $(COMPILE) $(FLAGS) -c $(SRCDIR)/constants.f
  54. iounits.o: $(SRCDIR)/iounits.f kinds_mod.o $(INCLUDE)
  55. $(COMPILE) $(FLAGS) -c $(SRCDIR)/iounits.f
  56. netcdf.o: $(SRCDIR)/netcdf.f kinds_mod.o constants.o $(INCLUDE)
  57. $(COMPILE) $(FLAGS) -c $(SRCDIR)/netcdf.f
  58. grids.o: $(SRCDIR)/grids.f kinds_mod.o constants.o iounits.o netcdf.o \
  59. $(INCLUDE)
  60. $(COMPILE) $(FLAGS) -c $(SRCDIR)/grids.f
  61. remap_vars.o: $(SRCDIR)/remap_vars.f kinds_mod.o constants.o grids.o \
  62. $(INCLUDE)
  63. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap_vars.f
  64. remap_conserv.o: $(SRCDIR)/remap_conserv.f kinds_mod.o constants.o \
  65. timers.o remap_vars.o grids.o $(INCLUDE)
  66. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap_conserv.f
  67. remap_distwgt.o: $(SRCDIR)/remap_distwgt.f kinds_mod.o constants.o \
  68. remap_vars.o grids.o $(INCLUDE)
  69. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap_distwgt.f
  70. remap_bilinear.o: $(SRCDIR)/remap_bilinear.f kinds_mod.o constants.o \
  71. remap_vars.o grids.o timers.o $(INCLUDE)
  72. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap_bilinear.f
  73. remap_bicubic.o: $(SRCDIR)/remap_bicubic.f kinds_mod.o constants.o \
  74. remap_vars.o grids.o $(INCLUDE)
  75. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap_bicubic.f
  76. timers.o: $(SRCDIR)/timers.f kinds_mod.o constants.o $(INCLUDE)
  77. $(COMPILE) $(FLAGS) -c $(SRCDIR)/timers.f
  78. remap_write.o: $(SRCDIR)/remap_write.f kinds_mod.o constants.o \
  79. netcdf.o remap_vars.o grids.o $(INCLUDE)
  80. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap_write.f
  81. remap_read.o: $(SRCDIR)/remap_read.f kinds_mod.o constants.o netcdf.o \
  82. remap_vars.o grids.o $(INCLUDE)
  83. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap_read.f
  84. read_input_file.o: $(SRCDIR)/read_input_file.f kinds_mod.o constants.o netcdf.o \
  85. remap_vars.o grids.o $(INCLUDE)
  86. $(COMPILE) $(FLAGS) -c $(SRCDIR)/read_input_file.f
  87. remap.o: $(SRCDIR)/remap.f kinds_mod.o constants.o
  88. $(COMPILE) $(FLAGS) -c $(SRCDIR)/remap.f
  89. scrip.o: $(SRCDIR)/scrip.f kinds_mod.o constants.o iounits.o timers.o \
  90. remap_vars.o grids.o remap_conserv.o remap_distwgt.o \
  91. remap_bilinear.o remap_bicubic.o remap_write.o \
  92. $(INCLUDE)
  93. $(COMPILE) $(FLAGS) -c $(SRCDIR)/scrip.f
  94. scrip_test.o: $(SRCDIR)/scrip_test.f kinds_mod.o constants.o iounits.o \
  95. netcdf.o remap_vars.o grids.o remap.o remap_read.o \
  96. $(INCLUDE)
  97. $(COMPILE) $(FLAGS) -c $(SRCDIR)/scrip_test.f
  98. scrip_use.o: $(SRCDIR)/scrip_use.f kinds_mod.o constants.o iounits.o \
  99. netcdf.o remap_vars.o grids.o remap.o \
  100. remap_read.o read_input_file.o \
  101. $(INCLUDE)
  102. $(COMPILE) $(FLAGS) -c $(SRCDIR)/scrip_use.f
  103. scrip_use_extrap.o: $(SRCDIR)/scrip_use_extrap.f kinds_mod.o \
  104. constants.o iounits.o \
  105. netcdf.o remap_vars.o grids.o remap.o \
  106. remap_read.o read_input_file.o \
  107. $(INCLUDE)
  108. $(COMPILE) $(FLAGS) -c $(SRCDIR)/scrip_use_extrap.f
  109. scripshape.o: $(SRCDIR)/scripshape.F90 $(INCLUDE)
  110. $(COMPILE) $(FLAGS) -c $(SRCDIR)/scripshape.F90
  111. scrip_test_repeat.o: $(SRCDIR)/scrip_test_repeat.f kinds_mod.o \
  112. constants.o netcdf.o \
  113. iounits.o remap_vars.o grids.o $(INCLUDE)
  114. $(COMPILE) $(FLAGS) -c $(SRCDIR)/scrip_test_repeat.f
  115. clean:
  116. /bin/rm *.o *.mod