Makefile.def for Fedora Core 5 is here

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
sukumar_baishya
Posts: 31
Joined: Sun Jul 11, 2004 5:48 am
Location: NERIST, Arunachal Pradesh, India,791109
Contact:

Makefile.def for Fedora Core 5 is here

Post by sukumar_baishya »

Hi all,

The Makefile.def.FEDORA5, for Fedora Core 5, has been prepared by modifying the Makefile.def.FEDORA4 available in OpenSees Linux tar ball. (Courtesy: fmk). I am posting it for the possible benefit of other users.

Before making OpenSees the following libraries/utilities should be installed.

1. gcc, gcc-g++, gcc-gfortran by using yum utility. (Direct rpm files fail in dependecy).
(command: yum install gcc gcc-g++ gcc-gfortran)
2. tcl8.4.12 (available in the distribution) and tk8.4.12 . Alternatively,tcl/tk 8.4.13 from the redhat fedora core site.
3. mesa (eqv to OpenGL) ; this is available with Fedora Core 5 distribution.
4. blitz library (http://sourceforge.net/projects/blitz) in the /home/USER_NAME/blitz-xy (where xy is version no.) directory.

/home/USER_NAME/bin and /home/USER_NAME/lib directories should be present.

The makefile.def is as follows:
----------------------------------------------------------------------------------------------------------
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework. Works on Linux version 6.1
# and below.
#
# Written: fmk
# Created: 10/99
# Modified: sukumar for Fedora Core 5
# Modification Date: 20/7/2006
#
# Send bug reports, comments or suggestions to fmckenna@ce.berkeley.edu
#
############################################################################

# %---------------------------------%
# | SECTION 1: PROGRAM |
# %---------------------------------%
#
# Specify the location and name of the OpenSees interpreter program
# that will be created (if this all works!)

OpenSees_PROGRAM = $(HOME)/bin/OpenSees

OPERATING_SYSTEM = LINUX
GRAPHICS = UsingOpenGL
PROGRAMMING_MODE = SEQUENTIAL
DEBUG_MODE = NO_DEBUG
RELIABILITY = NO_RELIABILITY


# %---------------------------------%
# | SECTION 2: PATHS |
# %---------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries or if you have
# any of the libraries already leave the directory location blank AND
# remove the directory from DIRS.

BASE = /usr/bin
HOME = /home/sukumar
FE = $(HOME)/OpenSees/SRC

BLASdir = $(HOME)/OpenSees/OTHER/BLAS
CBLASdir = $(HOME)/OpenSees/OTHER/CBLAS
LAPACKdir = $(HOME)/OpenSees/OTHER/LAPACK
SUPERLUdir = $(HOME)/OpenSees/OTHER/SuperLU_3.0/SRC
ARPACKdir = $(HOME)/OpenSees/OTHER/ARPACK
UMFPACKdir = $(HOME)/OpenSees/OTHER/UMFPACK
METISdir = $(HOME)/OpenSees/OTHER/METIS
SRCdir = $(HOME)/OpenSees/SRC


DIRS = $(BLASdir) $(CBLASdir) $(LAPACKdir) \
$(SUPERLUdir) $(ARPACKdir) $(UMFPACKdir) $(SRCdir) $(METISdir)

# %-------------------------------------------------------%
# | SECTION 3: LIBRARIES |
# | |
# | The following section defines the libraries that will |
# | be created and/or linked with when the libraries are |
# | being created or linked with. |
# %-------------------------------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries leave the
# libraries blank. You have to get your own copy of the tcl/tk
# library!!
#
# Note: For libraries that will be created (any in DIRS above)
# make sure the directory exists where you want the library to go!

FE_LIBRARY = $(HOME)/lib/libOpenSees.a
NDARRAY_LIBRARY = $(HOME)/lib/libndarray.a # BJ_UCD jeremic@ucdavis.edu
MATMOD_LIBRARY = $(HOME)/lib/libmatmod.a # BJ_UCD jeremic@ucdavis.edu
BJMISC_LIBRARY = $(HOME)/lib/libBJmisc.a # BJ_UCD jeremic@ucdavis.edu
LAPACK_LIBRARY = $(HOME)/lib/libLapack.a
BLAS_LIBRARY = $(HOME)/lib/libBlas.a
SUPERLU_LIBRARY = $(HOME)/lib/libSuperLU.a
CBLAS_LIBRARY = $(HOME)/lib/libCBlas.a
ARPACK_LIBRARY = $(HOME)/lib/libArpack.a
UMFPACK_LIBRARY = $(HOME)/lib/libUmfpack.a
METIS_LIBRARY = $(HOME)/lib/libMetis.a
TCL_LIBRARY = /usr/lib/libtk8.4.so /usr/lib/libXm.a /usr/lib/libtcl8.4.so
BLITZ_LIBRARY = $(HOME)/blitz-0.9/lib/libblitz.la
GRAPHIC_LIBRARY = -L/usr/lib -lGL -lGLU

# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.
WIPE_LIBS = $(FE_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(ARPACK_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(METIS_LIBRARY)

# %---------------------------------------------------------%
# | SECTION 4: COMPILERS |
# | |
# | The following macros specify compilers, linker/loaders, |
# | the archiver, and their options. You need to make sure |
# | these are correct for your system. |
# %---------------------------------------------------------%

# Compilers

CC++ = /usr/bin/g++
CC = /usr/bin/gcc
FC = /usr/bin/gfortran

AR = ar
ARFLAGS = cqls
RANLIB = ranlib
RANLIBFLAGS =

# Compiler Flags
#
# NOTES:
# C++ FLAGS TAKE need _UNIX or _WIN32 for preprocessor dircetives
# - the _WIN32 for the Windows95/98 or NT operating system.
# C FLAGS used -DUSE_VENDOR_BLAS (needed in SuperLU) if UNIX in C++ FLAGS
#

# modified as optimizaton currently causing problems with Steeln01 code
ifeq ($(DEBUG_MODE), DEBUG)

C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL84 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) \
-g -pg


CFLAGS = -Wall -pg $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall

# Linker
LINKER = $(CC++)
LINKFLAGS = -g -pg

else

C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL84 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) \
$(PROGRAMMING_FLAG) -O3 -ffloat-store
CFLAGS = -Wall -O2
FFLAGS = -Wall -O

# Linker
LINKER = $(CC++)
LINKFLAGS = -rdynamic -Wl

endif


GRAPHIC_FLAG = -D_GLX

# Misc
MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh

# %---------------------------------------------------------%
# | SECTION 5: COMPILATION |
# | |
# | The following macros specify the macros used in |
# | to compile the source code into object code. |
# %---------------------------------------------------------%

.SUFFIXES:
.SUFFIXES: .C .c .f .f90 .cpp .o .cpp

#
# %------------------%
# | Default command. |
# %------------------%
#
.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"
#
# %-------------------------------------------%
# | Command to build .o files from .f files. |
# %-------------------------------------------%
#

.cpp.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@

.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@
.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $< -o $@
.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@

# %---------------------------------------------------------%
# | SECTION 6: OTHER LIBRARIES |
# | |
# | The following macros specify other libraries that must |
# | be linked with when creating executables. These are |
# | platform specific and typically order does matter!! |
# %---------------------------------------------------------%
MACHINE_LINKLIBS = -L$(BASE)/lib \
-L$(HOME)/lib

MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(LAPACK_LIBRARY) $(BLAS_LIBRARY) $(CBLAS_LIBRARY) \
$(GRAPHIC_LIBRARY)\
-ldl -lgfortran -lpng

MACHINE_SPECIFIC_LIBS =



# %---------------------------------------------------------%
# | SECTION 7: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/include \
-I$(BASE)/include \
-I/usr/include/cxx \
-I$(HOME)/include -I$(HOME)/blitz

# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl

TCL_INCLUDES =

INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)

-----------------------------------------------------------------------------------------------------------

(Sukumar) :D
ahmetalperparker
Posts: 90
Joined: Wed Oct 26, 2005 6:31 am
Location: Istanbul Technical University

Post by ahmetalperparker »

also in fedora4 you have to create the lib and bin directories for a successful compiling. I think it should be same in fc5. You have to create these directories at the level with OpenSees.
Wish it's usefull
Ahmet Alper Parker
sukumar_baishya
Posts: 31
Joined: Sun Jul 11, 2004 5:48 am
Location: NERIST, Arunachal Pradesh, India,791109
Contact:

Post by sukumar_baishya »

Hi, Parker, and all others,

Of course these libs and bins are to be created in Fedora4 as well. I have a quetion : I couldnot follow ""You have to create these directories at the level with OpenSees."". May be you are saying that these are to be installed as user and not as su.
Pl. correct me if i m wrong. My OpenSees is working now. By the way would some one of you help me about the details of Recorder Object? In the user manual there is some explanation, but it seems, this much is not enough. Pl let me know the sources of these information.

Thanks

(Sukumar)
ahmetalperparker
Posts: 90
Joined: Wed Oct 26, 2005 6:31 am
Location: Istanbul Technical University

Post by ahmetalperparker »

What I tried to mean was, you have to create the folders in which the OpenSees folder exists (by the same level), not inside of OpenSees folder :) I have compiled as root at fedora4. Also about the recorders, what I couldn't find was recording the reactions which has to be written as ReactionsIncludingInertia (or similar, please refer to message board). There may be different commands, what kind of recording are you trying to exract? Also post it to the other message board to make see others to respond for you.
Regards
Ahmet Alper Parker
Post Reply