Changeset 201


Ignore:
Timestamp:
Jan 3, 2011 4:23:26 PM (12 years ago)
Author:
vondreele
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fsource/Makefile

    r128 r201  
    11# build the compiled fortran codes needed by GSAS-II
    22
    3 BIN = ../bin
    4 LIBS = $(BIN)/pack_f.$(SUFFIX) $(BIN)/pyspg.$(SUFFIX) $(BIN)/polymask.$(SUFFIX) $(BIN)/histogram2d.$(SUFFIX)
    5 LIBSwGSAS = $(BIN)/pypowder.$(SUFFIX)
     3BIN = ..\\bin
     4LIBS = $(BIN)/pack_f.$(SUFFIX) $(BIN)/pyspg.$(SUFFIX) $(BIN)/polymask.$(SUFFIX) $(BIN)/histogram2d.$(SUFFIX) $(BIN)/pypowder.$(SUFFIX)
    65SYMLIB := $(wildcard spsubs/*.for)
    7 MACFIX = \#
    8 MACCOPY = \#
     6POWLIB := $(wildcard powsubs/*.for)
     7MACFIX = #
     8MACCOPY = #
    99#----------------------------------------------------------------------
    1010# linux (gfortran)
    11 GSASlib = ./libgsas.a
    12 COMPILER=--fcompiler=gnu95
    13 PACKCOPTS=--f77flags="-fno-range-check"
    14 SUFFIX=so
    15 F2PY=f2py
    16 MOVE=mv
    17 DEL= \#
     11#GSASlib = ./libgsas.a
     12#COMPILER=--fcompiler=gnu95
     13#PACKCOPTS=--f77flags="-fno-range-check"
     14#SUFFIX=so
     15#F2PY=f2py
     16#MOVE=mv
     17#DEL= \#
    1818#----------------------------------------------------------------------
    1919# mac (gfortran)
     
    3232#PACKCOPTS=--f77flags="-fno-range-check"
    3333#SUFFIX=pyd
    34 #F2PY=f2py.py
     34#F2PY=f2py
    3535#MOVE=copy
    3636#DEL=del
    3737#----------------------------------------------------------------------
     38# Windows gfortran-32
     39COMPILER=--compiler=mingw32
     40PACKCOPTS=--f77flags="-fno-range-check"
     41SUFFIX=pyd
     42F2PY=f2py
     43MOVE=copy
     44DEL=del
     45
     46
     47
    3848
    3949ask:
    4050        @echo ""
    4151        @echo "Use make all or choose a target: "
    42         @echo " $(LIBS) $(LIBSwGSAS)"
    43         @echo "   Note: target $(LIBSwGSAS) requires the GSAS object library."
    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"
    46         @echo "     Makefile to set GSASlib to point to the correct location."
     52        @echo " $(LIBS) "
    4753
    48 all:: $(BIN) $(LIBS) $(LIBSwGSAS)
     54all:: $(BIN) $(LIBS)
    4955
    5056# OSX: note that this is building .so's that require libgfortran and
     
    5864$(BIN)/pack_f.$(SUFFIX): pack_f.for $(BIN)
    5965        $(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)
     66#       $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib pack_f.$(SUFFIX)
     67#       $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN)
     68#       $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib pack_f.$(SUFFIX)
     69#       $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN)
    6470        $(MOVE) pack_f.$(SUFFIX) $(BIN)
    6571        $(DEL) pack_f.$(SUFFIX)
    6672
    67 $(BIN)/pypowder.$(SUFFIX): pypowder.for $(GSASlib) $(BIN)
    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)
     73$(BIN)/pypowder.$(SUFFIX): pypowder.for $(POWLIB) $(BIN)
     74        $(F2PY) -c pypowder.for -m pypowder $(COMPILER) $(POWLIB)
     75#       $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib pypowder.$(SUFFIX)
     76#       $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN)
     77#       $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib pypowder.$(SUFFIX)
     78#       $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN)
    7379        $(MOVE) pypowder.$(SUFFIX) $(BIN)
    7480        $(DEL) pypowder.$(SUFFIX)
     
    7682$(BIN)/pyspg.$(SUFFIX): pyspg.for $(SYMLIB) $(BIN)
    7783        $(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)
     84#       $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib pyspg.$(SUFFIX)
     85#       $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN)
     86#       $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib pyspg.$(SUFFIX)
     87#       $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN)
    8288        $(MOVE) pyspg.$(SUFFIX) $(BIN)
    8389        $(DEL) pyspg.$(SUFFIX)
     
    8591$(BIN)/polymask.$(SUFFIX): polymask.for $(SYMLIB) $(BIN)
    8692        $(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)
     93#       $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib polymask.$(SUFFIX)
     94#       $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN)
     95#       $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib polymask.$(SUFFIX)
     96#       $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN)
    9197        $(MOVE) polymask.$(SUFFIX) $(BIN)
    9298        $(DEL) polymask.$(SUFFIX)
     
    94100$(BIN)/histogram2d.$(SUFFIX): histogram2d.for $(SYMLIB) $(BIN)
    95101        $(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)
     102#       $(MACFIX) /usr/local/lib/libgcc_s.1.dylib @loader_path/libgcc_s.1.dylib histogram2d.$(SUFFIX)
     103#       $(MACCOPY) /usr/local/lib/libgcc_s.1.dylib $(BIN)
     104#       $(MACFIX) /usr/local/lib/libgfortran.2.dylib @loader_path/libgfortran.2.dylib histogram2d.$(SUFFIX)
     105#       $(MACCOPY) /usr/local/lib/libgfortran.2.dylib $(BIN)
    100106        $(MOVE) histogram2d.$(SUFFIX) $(BIN)
    101107        $(DEL) histogram2d.$(SUFFIX)
Note: See TracChangeset for help on using the changeset viewer.