SHARE
TWEET

Aaron Knister

a guest Dec 27th, 2009 92 Never
  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)
RAW Paste Data
Top