#################################################################### # Makefile.config 18 October 1997 # # 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 # # 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 the like) ENDIANFLAG = -DCWP_LITTLE_ENDIAN ######################################################################## # 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 #OPTC = -O -s #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 # 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 #OPTC = -O -DCRAY # 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 #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/Third_Party/XDR/README for further information #POSTLFLAGS = -lnsl ######################################################################## # Target flags for standard 'make' installs #ITARGET = $$(@F) #SHTARGET = $$(@F).sh #CTARGET = $$(@F).c #C++TARGET = $$(@F).cc #XAPPTARGET = $$(@F) #XTITARGET = $$(@F) #XMITARGET = $$(@F) #ITRITARGET = $$(@F) #IWPCTARGET = $$(@F) #IDCTTARGET = $$(@F) #IRFLTARGET = $$(@F) #IMGLTARGET = $$(@F) # Target flags for 'GNU make' installs (do this under Linux) ITARGET = $I/%: % SHTARGET = $B/%: %.sh CTARGET = $B/%: %.c C++TARGET = $B/%: %.cc XAPPTARGET = $R/%: % XTITARGET = $I/Xtcwp/%: % XMITARGET = $I/Xmcwp/%: % ITRITARGET = $I/Triangles/%: % IWPCTARGET = $I/Wpc/%: % IDCTTARGET = $I/Dct/%: % IRFLTARGET = $I/Reflect/%: % IMGLTARGET = $I/MGL/%: % ######################################################################## # standard make line; change only if you are using a different 'make' MAKE = gmake ######################################################################## # C compiler; change this only if you are using a different C-compiler CC = gcc ######################################################################## # standard CFLAGS CFLAGS = -I$I $(OPTC) $(ENDIANFLAG) ######################################################################## # C++ interfacing is still experimental # C++ compiler C++ = c++ ######################################################################## # standard CFLAGS for C++ C++FLAGS = -I$I $(OPTC) $(ENDIANFLAG) ######################################################################## # 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 ############################################################################# # 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 ############################################################################# # C preprocessor (cpp) definition # use this under IRIX if using the native cc compiler CPP = /lib/cpp # under Solaris and IRIX, with gcc compiler, use: CPP = gcc -E # make sure the path to gcc matches that in the CC = line # use this under SOLARIS, if using the default C compiler #CPP = /usr/ccs/lib/cpp ############################################################################# # Some convenient abbreviations B = $(ROOT)/bin I = $(ROOT)/include L = $(ROOT)/lib M = $(ROOT)/man XTI = $I/Xtcwp XMI = $I/Xmcwp ITRI = $I/Triangles IWPC = $I/Wpc IDCT = $I/Dct IRFL = $I/Reflect IMGL = $I/MGL # XAPPDEFAULT directory R = $L/X11/app-defaults ##################################################################### ##################################################################### # # 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. # # 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. ##################################################################### # 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 fol