#################################################################### # Makefile.config 23 Dec 2004 # # Configuration file for the complete tree of Makefiles # in the CWP/SU Free Software distribution # # -John Stockwell # Center for Wave Phenomena # Colorado School of Mines # # Instructions: # Read this file, thoroughly, and make changes where necessary # to reflect the needs of your system. Under most UNIX-like systems # the changes you make here will be transmitted to all the Makefiles # in the tree of CWP codes, because those Makefiles include this # configuration file. # # You need to have set the $(CWPROOT) path environment variable. # (Hint: the directory that this file is in is: $(CWPROOT)/src) # # Make any other changes that are necessary for your particular system. # Hints have been provided to aid the user in this task. # # Installation: # When you are sure you have this file in agreement with your needs, # type: make install (to install the basic set of codes) # make xtinstall (to install the X-toolkit codes) # make finstall (to install the Fortran codes) # make mglinstall (to install the Mesa/ Open GL codes)** # make xminstall (to install the X-Motif codes)* # # to remake # type: make remake (to remake the basic set of codes) # make xtremake (to remake the X-toolkit codes) # make fremake (to remake the Fortran codes) # make mglremake (to install the Mesa/ Open GL codes)** # make xmremake (to remake the X-Motif codes)* # # * Note: You must have the Motif Developer's package to install these codes. # This is not the same as the "Motif Window Manager". Many systems # use the Motif Window Manager without providing libXm.a and Xm.h. # These items are not essential to the operation of the package # and may be bypassed. (Also, you may substitute Lesstif, for Motif.) # ** The Mesa/Open GL codes require the Mesa package # Note also: That * and ** are not necessarry for the majority of SU # operations and can be safely omitted, if you have trouble # installing them. # # If you have to make changes in a particular program to get it to # compile, you may continue compilation by typing 'make' in the directory # where the source code for that program resides. Or you may return to # the CWPROOT/src directory and type 'make install', 'make xtinstall', or # 'make xminstall'. On a rare occasion, you might have to use the "remake" # version of these commands to get the codes to compile properly after # fixing a particular program. # # Common changes: # MAKE = on some older style systems, (for example CONVEX), # 'make' doesn't support some of the features that we use here. # Your best bet is to install GNU make, available free from # prep.ai.mit.edu (18.71.0.38). # # Some PC Unix systems (for example Linux) use GNU make as the # official 'make' on their systems. # # CC = You will need a compiler that supports ANSI C function prototypes. # Some vendors may require you to purchase a separate ANSI C. # An alternative is the 'gcc' compiler created by the GNU group # which is also available free. ######################################################################## ######################################################################## # Operating Shell; don't change this line SHELL = /bin/sh ######################################################################## # HP Apollo users may need to take note of the following: # # If it looks like the CWPROOT environment variable isn't being # passed to the Makefiles below this directory, then explicitly # define CWPROOT on the next line and uncomment the entry. #CWPROOT = /your/root/path # root path ; don't change this line ROOT = $(CWPROOT) ######################################################################## # ENDIANFLAG tells the compiler whether your machine is has the byte # order of "big endian" (high byte) or "little endian" (low byte) # Use this ENDIANFLAG definition for IBM RS6000, SGI, HP, SUN, etc. #ENDIANFLAG = -DCWP_BIG_ENDIAN # Use this ENDIANFLAG for PC and DEC products (Linux PC's and Cygwin32) ENDIANFLAG = -DCWP_LITTLE_ENDIAN ######################################################################## # XDR is the external data representation. This flag is required for # installations on all 64 bit machines to provide data portability # Default is to not set the SUXDR option #XDRFLAG = # uncomment this if you want to install with XDR #XDRFLAG = -DSUXDR # for XDR under Linux XDRFLAG = -DSUXDR -D_BSD_SOURCE ######################################################################## ######################################################################## # Large file support, see Portability/README_LARGE_FILES for more info # Default, do not assume LARGE_FILES #LARGE_FILE_FLAG = # uncomment if you want to install with large file support # RedHat Linux LARGE_FILE_FLAG = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE # uncomment if you want to install with large file support # other platforms (non GNU source) #LARGE_FILE_FLAG = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE # for SUN OS 5.6 #LARGE_FILE_FLAG = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE ####################################################################### # In the Unocal standard of SU, the SU format includes the SEGY binary # reel header, and the text line header. Uncommenting the # LINEHDRFLAG line will activate this feature. The SUXDR flag should # not be set if you intend to live in the Unocal universe. # # Note: Unocal uses a slightly different version of segy.h than # the CWP/SU standard. The -DUNOCAL_SEGY_H flag invokes this attribute. # # CWP/SU standard #LINEHDRFLAG = # Unocal/SU standard # uncomment the next line if you want to use the Unocal SU standard #LINEHDRFLAG = -DSU_LINE_HEADER -DUNOCAL_SEGY_H ######################################################################## # OPTC is the optimization flag for your C compiler (-O for most) # this is a typical set of C options; you may need to change this # line. Note: the -s option strips out debugging information, to # make the executable files smaller. In all OPTC examples below # the -s may or may not be used. In fact, at least one SUN user # had the problem of "nm" complaining because "namelist was missing" # taking out the -s stopped the problem. #OPTC = -O -s # # Default-- this works on many systems #OPTC = -O # O3 optimization full ansi (Linux) OPTC = -O3 -Wall -ansi -pedantic -D_POSIX_SOURCE # another possibility, if you have problems with unistd.h not # being found #OPTC = -O3 -Wall -ansi -pedantic -D_POSIX_SOURCE -DHAVE_UNISTD_H # O3 optimization full ansi non-Posix compliant systems # this includes Mac OS X and CYGWIN32 #OPTC = -O3 -Wall -ansi -pedantic # use this for IBM RS6000 #OPTC = -O -DIBMRS6000 # The following OPTC may be used for IBM RS6000 to take # advantage of the qlanglvl=ansi option. # If you hit errors that stop the installation, please try # make remake or make xtremake or make xmremake with # a lower level of optimization, or use the default OPTC above. #OPTC = -O3 -qlanglvl=ansi -DIBMRS6000 # The following OPTC is what would be used for HP 9000 installs #OPTC = -O -Aa -D_HPUX_SOURCE # Another HP 9000 OPTC line possibility #OPTC = +O1 -Aa -D_HPUX_SOURCE # The following OPTC should be used under Solaris 2.xx #OPTC = -O -D_solaris_2_x_ -DSUN # The following OPTC may be faster on Sun SPARC, under # Solaris 2.xx with the GCC compiler #OPTC= -O2 -msupersparc -fallow-single-precision -ffast-math # For SUN installing with GCC compiler but without GLIBC libraries #OPTC = -O -DSUN_A -DSUN # For other SUN #OPTC = -O -DSUN # For Cray # Default #OPTC = -O -DCRAY # For Cray T3E #OPTC = -O -DCRAY -D_CRAYMPP # For Silicon Graphics Power Challenge (Power Challenge, only). # Use default OPTC for other SGI products # the one with "fullwarn" will give many more warnings #OPTC = -O2 -mips4 -64 -mp -fullwarn #OPTC = -O2 -mips4 -64 -mp ######################################################################## # PRELFLAGS and POSTLFLAGS are additional linking flags that may be # useful, for example if you want to statically compile the CWP/SU codes. # Setting PRELFLAGS will set the linking option at the beginning of the # string of linker options. Setting POSTLFLAGS will set the linking option # at the beginning of the string of linker options. # PRELFLAGS = POSTLFLAGS = # example of PRELFLAGS for static compiling on SUN with the acc compiler #PRELFLAGS = -Bstatic # #PRELFLAGS = -L/opt/ctl/cvt/3.1.0.0/lib #POSTLFLAGS = # Uncomment this for the xminstall phase under Solaris 2.xx #POSTLFLAGS = -L/usr/ccs/lib -lgen # For experimental xdr installs under Solaris 2.xx # See $(CWPROOT)/src/Portability/README_XDR for further information #POSTLFLAGS = -lnsl ######################################################################## # standard make line; change only if you are using a different 'make' MAKE = make ######################################################################## # Rules for standard `make' installs # leave the next line uncommented if you are using the standard Unix "make" # command. Make sure the gnumake.rules line is commented out in this case. #include $(CWPROOT)/src/Rules/oldmake.rules # If you get error messages about "can't find $(@F), then # you are actually using GNU make, and need to uncomment the # gnumake.rules line # Rules for 'GNU make' installs (includes Linux, FreeBSD, Mac OS X installs) # uncomment the next line if you are using "GNU make" include $(CWPROOT)/src/Rules/gnumake.rules ######################################################################## # C compiler; change this only if you are using a different C-compiler CC = cc ######################################################################## # standard CFLAGS CFLAGS = -I$I $(OPTC) $(LARGE_FILE_FLAG) $(ENDIANFLAG) $(XDRFLAG) $(LINEHDRFLAG) ######################################################################## # C++ interfacing is still experimental # C++ compiler C++ = c++ ######################################################################## # standard CFLAGS for C++ C++FLAGS = -I$I $(OPTC) $(LARGE_FILE_FLAG) $(ENDIANFLAG) $(XDRFLAG) ######################################################################## # under SUN OS make sure that your load library path is consistent with # your choice of C compiler above. Be sure to include any other library # paths (for example X windows). Set LD_LIBRARY_PATH as a shell environment # variable or hard set here. An example: #LD_LIBRARY_PATH = /usr/lang/SC2.0.1patch:/usr/lib/X11R5 # under SUN OS and Linux uncomment the next line #LD_LIBRARY_PATH += $(CWPROOT)/lib:/usr/local/lesstif/lib # under SUN OS and RedHat Linux uncomment the next line #LD_LIBRARY_PATH += $(CWPROOT)/lib:/usr/X11R6/LessTif/lib LD_LIBRARY_PATH += $(CWPROOT)/lib:/usr/lib ############################################################################# # the archiver AR = ar ############################################################################# # ar FLAGS ARFLAGS = rv ############################################################################# # ranlib definition RANLIB = ranlib # ranlib flags RANFLAGS = # under IRIX (Silicon Graphics, SGI), you probably will have # to use this line for RANLIB (also for SOLARIS) #RANLIB = ar -ts ############################################################################# # Some Makefiles have change the permissions of executable and other output # chmod line for include files. These lines should not be changed. ICHMODLINE = chmod 664 $@ # chmod line for executables MCHMODLINE = chmod 775 $@ # Uncomment the two lines below if installing under CYGWIN32 under Windows #ICHMODLINE = #MCHMODLINE = ############################################################################# # Default C preprocessor (cpp) definition # this is the one you will use on most systems # AIX, IRIX if using the native cc compiler, Linux #CPP = /lib/cpp CPP = cpp # under Solaris, IRIX, AIX, and possibly other with gcc compiler, use: #CPP = gcc -E # make sure the path to gcc matches that in the CC = line # # You can tell you need to invoke gcc -E if you compile the package # and get error messages about programs not recognizing header fields. # use this under SOLARIS, if using the default C compiler #CPP = /usr/ccs/lib/cpp # use this on Cray T3E #CPP = /opt/ctl/bin/cpp # use this on Mac OS X and Free BSD #CPP = /usr/bin/cpp ###################################################################### ###################################################################### # Fortan materials. # The majority of the SU package does not depend on fortran, so you # are free to ignore this if you are not planning on doing the 'finsintall' # portion of the installation. # # Please note, there may be additional compiler flags necessary to get # the Fortran codes to work properly. You may need to experiment. # # Default for IBM RS6000, SGI #OPTF = -O # Default for Linux and other GCC installs (most likely FreeBSD and Mac OS X) OPTF = -O -static -m486 -ansi -fno-globals -fno-automatic -fno-second-underscore # Use this for HP # (If you figure out what goes in #the next line, email me: john@dix.mines.edu) #OPTF = ###################################################################### # Fortran compiler # default (use g77 on Linux systems, f77 there is really f2c) #FC = f77 # GNU fortran compiler (Linux systems) FC = g77 # Fortran compiler on the Cray T3E #FC = f90 ############################################################################# # Some convenient abbreviations (don't change this) include $(CWPROOT)/src/Rules/abbrev.rules ##################################################################### ##################################################################### # # X-windows related materials: # # The paths to X11 include files and X11 libraries are not # consistent between vendors. The following are generic paths. # You may need to change these, if the include files and libraries # are not in these locations on your machine. # The default paths should work on many systems, for example,IBM RS6000. # Examples of the path SUN are given here. # # Troubleshooting: Make sure that your machine really has the X-windows # libraries and include files. Make sure that these files really # are where you think they are. ##################################################################### # X11 include and library paths #### # Generic (RS6000, SGI) # X11 include path #IX11 = /usr/local/include # X11 library path #LX11 = /usr/local/lib #### #### ## The following X11 include and X11 lib paths are recommended for ## SUN, provided that the standard X11 stuff is really /usr/openwin. # X11 include path #IX11 = /usr/openwin/include # X11 library path #LX11 = /usr/openwin/lib #### #### ## The following paths would be used under Linux ## and possibly under SCO Unix installs # X11 include path IX11 = /usr/X11R6/include # X11 library path LX11 = /usr/X11R6/lib #### ## Additional X libraries that may be needed for some systems ## Example: uncomment for CYGWIN32 installs #XLFLAGSADD = -lSM -lICE #### # Motif # # Note: Your machine can be running the Motif Window Manager, but not have the # Motif Developers Package (include files with names like Xm.h # and libraries with names like libXm.a). You can only do the xminstall # if you have these include files and libraries. # # include path #IMOTIF = /usr/local/include # library path #LMOTIF = /usr/local/lib # Example of Lesstif usage: # include path #IMOTIF = /usr/local/lesstif/include # library path #LMOTIF = /usr/local/lesstif/lib #### Example of Lesstif usage under RedHat # include path #IMOTIF = /usr/X11R6/LessTif/Motif2.0/include IMOTIF = /usr/X11R6/include # library path #LMOTIF = /usr/X11R6/LessTif/Motif2.0/lib LMOTIF = /usr/X11R6/lib #### Open GL/Mesa include and library paths (generic example) # Open GL/Mesa include path #IGL = /usr/local/include # Open GL/Mesa library path #LGL = /usr/local/lib ## GLUT include and library paths # include path #IGLUT = /usr/local/include # library path #LGLUT = /usr/local/lib #### examples for SGI with glut installed in /usr/local/glut-3.3 ## GLUT include and library paths #IGLUT = /usr/local/glut-3.3 # Open GL/Mesa library path #LGLUT = /usr/local/glut-3.3/lib/glut.n64 #### #### Old Red Hat Linux example ## GLUT include and library paths #IGLUT = /usr/X11R6/include # Open GL/Mesa library path #LGLUT = /usr/X11R6/lib ### #### Red Hat 7.2 Linux example ## GLUT include and library paths IGLUT = /usr/include # Open GL/Mesa library path LGLUT = /usr/lib ### ################################################################ ### CFLAGS lines (Don't change the next line) include $(CWPROOT)/src/Rules/cflags.rules ###################################################################### ### Linking Flags for Experimental 3D graphics # The choice here is between the free Mesa package, and the # Open GL (hardware-based) package. # ### MESA / OPEN GL Linking Flags # Uncomment the next line for installations using the free Mesa package #include $(CWPROOT)/src/Rules/newmesa.rules # Uncomment the following line for installations using Open GL (eg. SGI) # Chris: Mesa is now compliant with these rules... include $(CWPROOT)/src/Rules/opengl.rules ###################################################################### ###################################################################### # Suffix rules for library maintenance # # If your version of 'make' does not support suffix rules, # you should install GNU make (often called 'gmake') and use that. # Gmake is available from prep.ai.mit.edu (18.159.0.42) # and other GNU mirror sites. # standard suffix rules (do not change the next line) include $(CWPROOT)/src/Rules/suffix.rules include $(CWPROOT)/src/Rules/misc.rules