Changeset 127
- Timestamp:
- Jul 22, 2010 5:53:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/fsource/Makefile
r102 r127 1 1 # build the compiled fortran codes needed by GSAS-II 2 2 3 BIN = bin4 LIBS = $(BIN)/pack_f.$(SUFFIX) $(BIN)/pyspg.$(SUFFIX) 3 BIN = ../bin 4 LIBS = $(BIN)/pack_f.$(SUFFIX) $(BIN)/pyspg.$(SUFFIX) $(BIN)/polymask.$(SUFFIX) $(BIN)/histogram2d.$(SUFFIX) 5 5 LIBSwGSAS = $(BIN)/pypowder.$(SUFFIX) 6 6 SYMLIB := $(wildcard spsubs/*.for) 7 MACFIX = \# 8 MACCOPY = \# 7 9 #---------------------------------------------------------------------- 8 10 # linux (gfortran) 11 #GSASlib = ./libgsas.a 9 12 #COMPILER=--fcompiler=gnu95 10 13 #PACKCOPTS=--f77flags="-fno-range-check" … … 17 20 GSASlib = /Users/toby/software/work/gsas/2009Aug31/libgsas.a 18 21 COMPILER=--fcompiler=gnu95 --f90exec=/usr/local/bin/gfortran 19 #PACKCOPTS=--f77flags="-fno-range-check -static-libgcc"22 PACKCOPTS=--f77flags="-fno-range-check" 20 23 SUFFIX=so 21 24 F2PY=f2py 22 25 MOVE=mv 23 DEL=echo 26 DEL=\# 27 MACFIX = install_name_tool -change 28 MACCOPY = cp 24 29 #---------------------------------------------------------------------- 25 30 # windows g77 … … 37 42 @echo " $(LIBS) $(LIBSwGSAS)" 38 43 @echo " Note: target $(LIBSwGSAS) requires the GSAS object library." 39 @echo " This is not built with make all. You will need to edit the" 44 @echo " File $(LIBSwGSAS) is built from files that are not distributed." 45 @echo " This is built last with make all. You may need to edit the" 40 46 @echo " Makefile to set GSASlib to point to the correct location." 41 47 42 all:: $(BIN) $(LIBS) 48 all:: $(BIN) $(LIBS) $(LIBSwGSAS) 43 49 44 50 # OSX: note that this is building .so's that require libgfortran and 45 # libgcc_s.1 at runtime. The former can be removed by renaming the accessed46 # libgfortran.3.dynlib. Not sure how to avoid libgcc_s.151 # libgcc_s.1 at runtime. Based on advice from Ilan at EPD, the .so files are 52 # modified so that the libraries are placed in the same location as the .so files 47 53 # Use otool -L <file.so> to see what is required 48 54 # … … 52 58 $(BIN)/pack_f.$(SUFFIX): pack_f.for 53 59 $(F2PY) -c pack_f.for -m pack_f $(COMPILER) $(PACKCOPTS) 60 $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib pack_f.$(SUFFIX) 61 $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN) 62 $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib pack_f.$(SUFFIX) 63 $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN) 54 64 $(MOVE) pack_f.$(SUFFIX) $(BIN) 55 65 $(DEL) pack_f.$(SUFFIX) … … 57 67 $(BIN)/pypowder.$(SUFFIX): pypowder.for $(GSASlib) 58 68 $(F2PY) -c pypowder.for -m pypowder $(COMPILER) $(GSASlib) 69 $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib pypowder.$(SUFFIX) 70 $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN) 71 $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib pypowder.$(SUFFIX) 72 $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN) 59 73 $(MOVE) pypowder.$(SUFFIX) $(BIN) 60 74 $(DEL) pypowder.$(SUFFIX) 61 75 62 76 $(BIN)/pyspg.$(SUFFIX): pyspg.for $(SYMLIB) 63 $(F2PY) -c pyspg.for $(SYMLIB) -m pyspg $(COMPILER) 77 $(F2PY) -c pyspg.for $(SYMLIB) -m pyspg $(COMPILER) 78 $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib pyspg.$(SUFFIX) 79 $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN) 80 $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib pyspg.$(SUFFIX) 81 $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN) 64 82 $(MOVE) pyspg.$(SUFFIX) $(BIN) 65 83 $(DEL) pyspg.$(SUFFIX) 84 85 $(BIN)/polymask.$(SUFFIX): polymask.for $(SYMLIB) 86 $(F2PY) -c polymask.for -m polymask $(COMPILER) 87 $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib polymask.$(SUFFIX) 88 $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN) 89 $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib polymask.$(SUFFIX) 90 $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN) 91 $(MOVE) polymask.$(SUFFIX) $(BIN) 92 $(DEL) polymask.$(SUFFIX) 93 94 $(BIN)/histogram2d.$(SUFFIX): histogram2d.for $(SYMLIB) 95 $(F2PY) -c histogram2d.for -m histogram2d $(COMPILER) 96 $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib histogram2d.$(SUFFIX) 97 $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN) 98 $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib histogram2d.$(SUFFIX) 99 $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN) 100 $(MOVE) histogram2d.$(SUFFIX) $(BIN) 101 $(DEL) histogram2d.$(SUFFIX) 102 103 104 # basic outline for build; change ????? and add any specific options to F2PY step 105 # $(BIN)/?????.$(SUFFIX): ?????.for $(SYMLIB) 106 # $(F2PY) -c ?????.for -m ????? $(COMPILER) 107 # $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib ?????.$(SUFFIX) 108 # $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN) 109 # $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib ?????.$(SUFFIX) 110 # $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN) 111 # $(MOVE) ?????.$(SUFFIX) $(BIN) 112 # $(DEL) ?????.$(SUFFIX) 113 66 114 67 115 # no longer in use
Note: See TracChangeset
for help on using the changeset viewer.