# OS independent make configuration file for GAMIT/GLOBK installation.
# Used by shell script unimake (see, in /com) and in conjunction with generic
# Makefiles in each module directory (documented in Makefile.generic under
# libraries/comlib).
# Created on July 16, 1996 by P. Fang. Last modified by M. Floyd 200225
(Tested for Sun OS4, Solaris 2, HP-UX, DEC OSF1, SGI IRIX)
(Code for IBM and DEC ULTRX present but not yet tested)
# The rules of constructing this configuration file:
1. Each OS is identified by a character string and a pair of numbers.
The character string should be the first 'word' (or 'token') printed
when you type 'uname -a' on your system (e.g. 'SunOS' for Sun OS/4 and
Solaris systems); The numbers correspond to the range of OS versions
for which the configuration block is valid; they should be expanded with
zeroes to 4 digits (e.g. 4110 4130 for SunOS versions 4.1.1 to 4.1.3),
to be compared numerically to the version given by the third word printed
by the 'uname -a' command when it also is expanded to 4 digits after removal
of all letters (e.g., 0901 for HP-UX versions A.09.01) . For the conversion
of the these by unimake see the three blocks of code below '#detect user system'
in the script.
2. To configure this file for your own system, you should normally have
to change only the path for X11 (needed for CVIEW) and the size variables
for GAMIT compilation. If your system is not included among those given
below, then you need to add it to this file. Note that with newer Linux
systems (e.g Fedora Core 4 and higher), the X11 libraries are dynamic,
referenced via the environment variable LD_LIBRARY_PATH.
3. If you are using a compiler other than the one normally supplied by
the manufacturer of your operating system (e.g., gcc and g77 with
Solaris), then you need to use the -c option when you run 'install_software',
install_updates', or 'unimake'.
4. The FFLAGS (but not yet CFLAGS) of Makefile.config can be overridden
with module-specific entries of the same form in Makefile.generic
(see, e.g., gamit/solve/Makefile.generic).
5. Any valid compiler macros and compiler instructions can be used within an
OS dependent block.
6. In the SUFFIX RULES and EXPLICIT rules blocks the entries must be indented
with TABS, not spaces. Be careful that the tab characters are not lost if you
transfer this file via e-mail. In the 'ranlib' entry under EXPLICIT RULES for
the Sun, the keyword THELIB is replaced in unimake by the name of the archive.
# Notes on flags for GAMIT and GLOBK:
1. With a few exceptions handled by Makefile.generic entries, all of /libraries,
/gamit, and /kf can be made with the same compiler flags. Hence, a single
version of Makefile.config can be kept in /libraries, with links to it set in
/gamit and /kf.
2. For maximum speed, all of the code should be compiled with Fortran level-3
optimization, which has been well-tested under Sun OS/4, Solaris 2, HP-UX,
g77, and gfortran. Occasionally, bugs in a newly released compiler have
caused problems with optimization; if you suspect this to be true, try
lowering the optimization and let us know of the problem.
3. Static storage (FFLAGS -K) is required for both programs under HP-UX.
4. There are many routines in /kf that have more than the default 21 continuation
lines allowed by the Sun Fortran compilers; hence we use the -Nl100 option
with FFLAGS.
5. The C-compiler distributed by Sun in its standard 'bundle' will not
handle ANSI-standard code. Hence you must purchase the 'licensed' compiler
(also 'cc'), or obtain the (free) Gnu C-compiler (gcc) or equivalent.
# ----------------------- common --------------------------------- #
# X11 library location - uncomment the appropriate one for your system
# Generic (will work on any system if links in place)
X11LIBPATH /usr/lib
X11INCPATH /usr/include
# Specific to Linux Ubuntu and Debian
#X11LIBPATH /usr/lib/x86_64-linux-gnu
#X11INCPATH /usr/include
# Specific to Linux CentOS and openSUSE
#X11LIBPATH /usr/lib64
#X11INCPATH /usr/include
# Specific to Linux RedHat 7,8 and 9, RH-FC1 -> 3
#X11LIBPATH /usr/X11R6/lib
#X11INCPATH /usr/X11R6/include
# Specific for Mac OS X and macOS
#X11LIBPATH /usr/X11/lib
#X11INCPATH /usr/X11/include
# Specific for Sun with OpenWindows
#X11LIBPATH /usr/openwin/lib
#X11INCPATH /usr/openwin/share/include
# Specific for PC Solaris 10
#X11LIBPATH /usr/openwin/lib/
#X11INCPATH /usr/openwin/share/include
# Specific to FC5
#X11LIBPATH /usr/lib
#X11INCPATH /usr/include
# Specific for MIT HP and Sun for Release 5
#X11LIBPATH /usr/lib/X11R5
#X11INCPATH /usr/include/X11R5
# Specific for IBM AIX4.2
#X11LIBPATH /usr/lpp/X11/lib
#X11INCPATH /usr/lpp/X11/include
# Specific for IBM AIX7.1
# X11LIBPATH /usr/X11R6/lib
# X11INCPATH /usr/include
# GAMIT size dependent variables (read by script 'redim' which edits the include files)
MAXSIT 80
MAXSAT 35
MAXATM 25
MAXEPC 2880
# --------------- OS dependent blocks ---------------------------- #
# ------- for HP-UX 9.00 and above-------------- #
OS_ID HP-UX 0900 9999
# ASSIGMENTS
FFLAGS = +implicit_none +O2 +U77
CFLAGS = -g -Aa -Ae
FTN = f90
# f77 will not work since the -L option is defined differently
# MOD: Changed to f90 for HPUX 9 and 10 to support integer*4
CC = cc
# EXPLICIT_RULES
# (not needed for HP)
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ $*.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ $*.o
rm -f $*.o
# BLOCKEND
# ------- for HP-UX 11.00 and above-------------- #
OS_ID HP-UX 1100 9999
# ASSIGMENTS
FFLAGS = +implicit_none +O2 +U77
CFLAGS = -g -Ae
FTN = f90
# f77 will not work since the -L option is defined differently
CC = cc
# EXPLICIT_RULES
# (not needed for HP)
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ $*.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ $*.o
rm -f $*.o
# BLOCKEND
# ----- for SunOS from 4.1.1 to 4.1.3.1 ------------ #
OS_ID SunOS 4110 4131
# ASSIGMENTS
FFLAGS = -O3 -u -Nl100
FTN = f77
CFLAGS = -g
CC = cc
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
# ----- for SunOS from 5.1 to 5.9 (Solaris 2.1 to 2.9) -- #
OS_ID SunOS 5100 5900
# ASSIGMENTS
FFLAGS = -O3 -u -Nl100
FTN = f77
CFLAGS = -g
CC = cc
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
# ------- for DECs ------------------------------------- #
# GCM: ULTRIX tonga 4.2 0 RISC
# Technion: ULTRIX cvgeo 4.3 0 RISC
# ERL: OSF1 chandon V4.0 464 alpha
# ANU: OSF1 xanadu V3.2 214.61 alpha
OS_ID ULTRIX 4200 4300
# ASSIGMENTS
FFLAGS = -O3 -assume byterecl
FTN = f77
CFLAGS =
CC = cc
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ $*.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ $*.o
rm -f $*.o
# BLOCKEND
OS_ID OSF1 2000 4000
# ASSIGMENTS
FFLAGS = -O5 -assume byterecl -fpe4
FTN = f77
CFLAGS =
CC = cc
MATHLIB = /usr/include/math.h
# EXPLICIT_RULES
ar rv $@ *.o
# SUFFIX_RULES
.c.o:
$(CC) -c $(CFLAGS) $(MATHLIB) -I$(II) $<
.f.o:
$(FTN) -c $(FFLAGS) $<
# BLOCKEND
# ----- for Linux from 0.0.1 to 5.5.8 (latest stable version as of release 10.71; see https://www.kernel.org/) -- #
OS_ID Linux 0001 5804
# ASSIGMENTS
# ASSIGMENTS
### LF95 flags ###
#FTN = lf95
#FFLAGS = -O
#CC = gcc
#CFLAGS = -g
### IFC 7.0 flags ###
#FTN = ifc
#FFLAGS = -O -Vaxlib -save -zero -u -72 -w95 -w90 -cm
#CC = icc
#CFLAGS = -O
### IFORT 8.0 flags ###
#FTN = ifort
#FFLAGS = -O3 -Vaxlib -save -zero -u -72 -w95 -w90 -cm -assume byterecl -static -xN
#CC = icc
#CFLAGS = -O
### IFORT 9.0 flags ###
#FTN = ifort
#FFLAGS = -O3 -Vaxlib -save -zero -u -72 -w95 -w90 -cm -assume byterecl -static -Xt
#CC = icc
#CFLAGS = -O
### G77 flags ###
#FTN = g77
#FFLAGS = -O3 -Wuninitialized -Wunused -Wimplicit -fno-f2c -ffast-math -fno-automatic -fno-backslash -Wno-globals -fno-globals
#CC = gcc
#CFLAGS = -g
### GCC V4 gfortran flags ###
FTN = gfortran
FFLAGS = -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash -m64 -mcmodel=large
CC = gcc
#CFLAGS = -g
#### For 64-bit machines:
CFLAGS = -g -m64 -DADD64BIT
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ *.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
#------ for Mac OSX 5.2-8.8.0 (10.4.8) and Snow Leopard OSX 10.0.0
OS_ID Darwin 1000 9900
# ASSIGMENTS
### GCC V4 gfortran flags ###
FTN = gfortran
FFLAGS = -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash -m64
CC = gcc
CFLAGS = -g -m64
### PGI Fortran flags ###
#FTN = pgfortran
#FFLAGS = -fast -Mnobackslash -Msave -m64
#CC = clang
#CFLAGS = -g -m64
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ *.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
# ----- for CYGWIN from 0.0.1 to 1.7.20 on Windows -- #
OS_ID CYGWIN 0000 1720
# ASSIGMENTS
### GCC V4 gfortran flags ###
FTN = gfortran
FFLAGS = -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash -m64 -mcmodel=large
CC = gcc
CFLAGS = -g -m64
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ *.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
# ----- for PC Solaris from 5.10 (Solaris 10) using sunstudio compilers -- #
OS_ID PCSol 5100 5100
# ASSIGMENTS
FFLAGS = -f77 -ftrap=%none -O3 -u
FTN = f90
CFLAGS = -g
CC = cc
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ *.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
# ----- for PC Solaris from 5.2 to 5.8 (Solaris 2.2 to 2.8) -- #
OS_ID PCSol 5200 5800
# ASSIGMENTS
FFLAGS = -O3 -Wuninitialized -Wunused -Wimplicit -fno-f2c -ffast-math -fno-automatic -fno-backslash -Wno-globals -fno-globals
FTN = g77
CFLAGS = -g
CC = gcc
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ *.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
# ------- for IBM ------------------------------ #
#Technion: AIX cviva 2 3 000050064900
OS_ID AIX 1000 2000
# The following is untested.
# ASSIGMENTS
#FFLAGS = O3
FFLAGS = -O3 -q64 -qarch=pwr7
#FFLAGS = -O0 -g
FTN = f77
CFLAGS = -I
CC = cc
MATHLIB = /usr/include/math.h
# EXPLICIT_RULES
# (unknown yet)
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) $(MATHLIB) $<
ar rv $@ *.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
# BLOCKEND
# ------- for IRIX 6200 ------------------------ #
#
# Modifications from Sargis Dallakyan, CERFACS, Toulouse, France (sargis@cerfacs.fr)
OS_ID IRIX 6200 6200
# ASSIGMENTS
FFLAGS = -j -u -Nl100
FTN = f77
CFLAGS =
CC = cc
# EXPLICIT_RULES
ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ $*.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ $*.o
rm -f $*.o
# BLOCKEND
# ------- for IRIX 6300 - 6400 ----------------- #
# Added configuration for SGI IRIX 6.3 - 6.4 Lada L. Dimitrova (Harvard/Guilford) June 30 1998
OS_ID IRIX64 6300 6400
# ASSIGMENTS
# -NC100 allows for 100 continuation lines in the makefile
FFLAGS = -O -u -NC100
FTN = f77
CFLAGS =
CC = cc
# EXPLICIT_RULES
# uncomment next statement if ranlib is available
# ranlib THELIB
# SUFFIX_RULES
.c.a:
$(CC) -c $(CFLAGS) -I$(II) $<
ar rv $@ $*.o
rm -f $*.o
.f.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ $*.o
rm -f $*.o
# BLOCKEND
# LLD <<
# ------- for IRIX 6400 ------------------------ #
OS_ID IRIXXX 6400 6600
# ASSIGMENTS
FFLAGS = -u
FTN = f77
CFLAGS =
CC = cc
# EXPLICIT_RULES
# SUFFIX_RULES
.c.a::
$(CC) : -c $(CFLAGS) -I$(II) $<
ar rv $@ $*.o
rm -f $*.o
.f90.a:
$(FTN) -c $(FFLAGS) $<
ar rv $@ *.o
rm -f $*.o
.f.a::
$(FTN) : -c $(FFLAGS) $<
ar rv $@ $*.o
rm -f $*.o
# BLOCKEND