• R/O
  • SSH
  • HTTPS

molby: Commit


Commit MetaInfo

Revision91 (tree)
Time2011-08-03 19:02:52
Authortoshinagata1964

Log Message

Mac: config.h/Makefiles for AmberTools is modified so that gfortran library is statically linked

Change Summary

Incremental Difference

--- trunk/amber11/src/config.h (revision 90)
+++ trunk/amber11/src/config.h (revision 91)
@@ -55,6 +55,7 @@
5555 OCFLAGS=-O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DBINTRAJ $(AMBERBUILDFLAGS)
5656 #NABFLAGS=
5757 LDFLAGS= $(AMBERBUILDFLAGS) -framework Accelerate
58+FLDFLAGS= -nodefaultlibs -lgfortran-static -lgcc -lc -lm -lSystem -lSystemStubs -lgfortranbegin
5859 else
5960 CC=gcc
6061 CXX=g++
@@ -63,6 +64,7 @@
6364 OCFLAGS=-O3 -DUSE_AMBER_C9XCOMPLEX -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $(AMBERBUILDFLAGS) -DWINDOWS=1
6465 NABFLAGS=
6566 LDFLAGS=-Wl,--stack=0x01000000 $(AMBERBUILDFLAGS)
67+FLDFLAGS=
6668 endif
6769
6870 #LEX= flex
--- trunk/amber11/src/sqm/Makefile (revision 90)
+++ trunk/amber11/src/sqm/Makefile (revision 91)
@@ -83,7 +83,7 @@
8383 mv sqm$(SFX) $(BINDIR)
8484
8585 sqm$(SFX): qmmm_module.o $(SQMOBJ) netlib sys
86- $(FC) -o sqm$(SFX) $(SQMOBJ) qmmm_module.o $(FLIBSF) ../lib/sys.a $(LDFLAGS)
86+ $(FC) -o sqm$(SFX) $(SQMOBJ) qmmm_module.o $(FLIBSF) ../lib/sys.a $(LDFLAGS) $(FLDFLAGS)
8787
8888 #-----------LIBS
8989
--- trunk/amber11/src/lib/Makefile (revision 90)
+++ trunk/amber11/src/lib/Makefile (revision 91)
@@ -51,7 +51,7 @@
5151 @echo "(lib: make specific .o files, driven by other Makefiles)"
5252
5353 new2oldparm$(SFX): new2oldparm.o nxtsec.o
54- $(FC) -o new2oldparm$(SFX) new2oldparm.o nxtsec.o
54+ $(FC) -o new2oldparm$(SFX) new2oldparm.o nxtsec.o $(LDFLAGS) $(FLDFLAGS)
5555
5656
5757 sys.a: sys.o wallclock.o random.o veclib.o
--- trunk/amber11/src/etc/Makefile (revision 90)
+++ trunk/amber11/src/etc/Makefile (revision 91)
@@ -32,13 +32,13 @@
3232 all: $(PROGS)
3333
3434 nukit$(SFX): nukit.o
35- $(FC) -o nukit nukit.o $(LDFLAGS)
35+ $(FC) -o nukit nukit.o $(LDFLAGS) $(FLDFLAGS)
3636
3737 nucgen$(SFX): $(NOBJ) syslib
38- $(FC) -o nucgen$(SFX) $(NOBJ) ../lib/sys2.a $(LDFLAGS)
38+ $(FC) -o nucgen$(SFX) $(NOBJ) ../lib/sys2.a $(LDFLAGS) $(FLDFLAGS)
3939
4040 ambpdb$(SFX): $(AOBJ) syslib
41- $(FC) -o ambpdb$(SFX) $(AOBJ) ../lib/sys2.a $(LDFLAGS)
41+ $(FC) -o ambpdb$(SFX) $(AOBJ) ../lib/sys2.a $(LDFLAGS) $(FLDFLAGS)
4242
4343 elsize$(SFX): elsize.o
4444 $(CC) $(CFLAGS) -o elsize$(SFX) elsize.o $(LM)
@@ -48,7 +48,7 @@
4848 molsurf.o: molsurf.h
4949
5050 resp$(SFX): lapack.o resp.o
51- $(FC) $(LDFLAGS) lapack.o resp.o -o resp$(SFX)
51+ $(FC) $(LDFLAGS) lapack.o resp.o -o resp$(SFX) $(FLDFLAGS)
5252
5353 syslib::
5454 cd ../lib && $(MAKE) sys2.a
--- trunk/README (revision 90)
+++ trunk/README (revision 91)
@@ -5,7 +5,7 @@
55 An Interactive Molecular Modeling Software
66 with Integrated Ruby Interpreter
77
8- Version 0.5.6 build 20110730
8+ Version 0.5.6.1 build 20110803
99
1010 Toshi Nagata
1111
@@ -56,8 +56,17 @@
5656
5757 Install Xcode, if you have not done so yet. The Xcode project included in the source distribution is for Xcode 3.0 and later, thus you need Mac OS 10.5. It may work with Xcode 2.5 on Mac OS 10.4, but this have not been tested.
5858
59-To build AmberTools, you need to have gfortran installed. The author uses a binary build available at the "R for Mac OS X" website (http://r.research.att.com/tools/).
59+To build AmberTools, you need to have gfortran installed. The author uses a binary build available at the "R for Mac OS X" website (http://r.research.att.com/tools/, gfortran-4.2.3.dmg).
6060
61+We need static linking of libgfortran.a. For that purpose, the following modification should be done after installation of gfortran.
62+
63+% cd /usr/local/lib
64+% sudo cp libgfortran.a libgfortran-static.a # Copy as a different name
65+% sudo strip -S libgfortran-static.a # Remove the symbols
66+% sudo ranlib libgfortran-static.a
67+
68+The last two lines are necessary to avoid linker warnings saying "Can't find atom for N_GSYM stabs."
69+
6170 (ii) wxWidgets
6271
6372 Get wxMac-2.8.9.tar.gz from the wxWidgets page in sourceforge.net (http://sourceforge.net/projects/wxwindows/files/). Newer versions may work, but they are not tested.
@@ -188,5 +197,6 @@
188197 2010.1.21.
189198 2010.1.31. Added notice on AmberTools1.3
190199 2010.4.29. Update description for MinGW/MSYS
200+2011.8.3. Added notice on static linking of libgfortran for Mac
191201
192202 Toshi Nagata
Show on old repository browser