This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Aaron Knister

By: a guest on Dec 27th, 2009  |  syntax: None  |  size: 0.34 KB  |  views: 85  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. EXENAME=main
  2.  
  3. .PHONY: clean all
  4.  
  5. all: $(EXENAME)
  6.  
  7. clean:
  8.         rm -f *.mod *.o *.so $(EXENAME)
  9.  
  10. mymod.o mymod.mod:
  11.         $(FC) -g -fPIC -c mymod.f90
  12.  
  13. libmymod.so: mymod.o
  14.         $(CC) -g -shared -Wl mymod.o -o libmymod.so
  15.  
  16. $(EXENAME).o:
  17.         $(FC) -g -c $(EXENAME).f90
  18.  
  19. main: $(EXENAME).o libmymod.so
  20.         $(FC) -g $(EXENAME).o -L. -lmymod -o $(EXENAME)
clone this paste RAW Paste Data