Source-Code

ifdef THIS_IS_ONLY_FOR_DOCUMENTATION
/** 
*/

/**
\file  makefile.gen

\brief 
Default preferences

@author Ralf Huhmann

This file defines the default preferences for all makefiles, like pathnames of 
libraries and includes,
commandline-options, executables of compilers and tools.
The environment-variable BELA_BUILD_DIR defines the prefix of project pathes and dependencies.

see \ref gen_source 
*/

/**
\page gen_source Source-Code

\verbinclude makefile.gen
*/


/*!
\if make
endif

#######################################
# general preferences and definitions #
#######################################


#############
# system incdir
SYSINCDIR=/usr/local/include
MOTIFINCDIR=/usr/include/Xm
# system libdir
SYSLIBDIR=/usr/local/lib
SYSLIBDIR64=/usr/local/lib64

# system libdir 64-bit
X11LIBDIR=/usr/lib
X11LIBDIR64=/usr/lib64

# sql incdir
SQLINCDIR=$(ORACLE_HOME)/rdbms/public
# sql libdir
SQLLIBDIR=$(ORACLE_HOME)/lib32
# sql libdir 64-bit
SQLLIBDIR64=$(ORACLE_HOME)/lib

#############
# system libs
SYS1LIBS=
SYS1LIBS +=  -lXm -lXfont -lX11 -lfreetype
SYS1LIBS +=  -lsqlplus -lclntsh -lnnz11
SYS1LIBS +=  -limf
SYS1LIBS +=  -lexpat 

SYS0LIBS = 
SYS0LIBS += -lpthread -lrt -lm -lc 


######################
# root of front end
FED_ROOT=/common/usr/production
FED_BUILDVERSION=current
FED_BUILDNO=$(shell readlink ${FED_ROOT}/lib/asl/${FED_BUILDVERSION})
#FED_BUILDNO=21

######################
# system jars
SYSJAR := 
SYSJAR += /ora/oracle/11.1.0/client/jdbc/lib/ojdbc6.jar

###########################################
# additional general bela libs and includes
GENINCDIR= $(BELA_COMMON)/gen/include
GENLIBDIR= $(BELA_COMMON)/gen/lib
GENLIBDIR64= $(BELA_COMMON)/gen/lib64


###########################################
# common dependencies
COMMONDEPS = sys-tools/misc-cfgparser/@version()/target-dflt

DEPS += $(COMMONDEPS)

###########################################
# common usr includes
COMMONINCDIR =
COMMONINCDIR += $(BEL_USR)/include
COMMONINCDIR += $(BEL_USR)/include/omniORB4
COMMONINCDIRS = $(foreach inc, $(COMMONINCDIR), -I$(inc))
# common usr lib
COMMONLIBDIR=$(BEL_USR)/lib


######################
# special FE includes
FEINCDIR = 
FEINCDIR += $(FED_ROOT)/include/asl/$(FED_BUILDNO)/
FEINCDIR += $(FED_ROOT)/include/msg/
FEINCDIR += $(FED_ROOT)/include/vme/$(FED_BUILDNO)/
# -I path
FEINCDIRS = $(foreach inc, $(FEINCDIR), -I$(inc))

# FE lib dir
FELIBDIR = 
FELIBDIR += $(FED_ROOT)/lib/asl/$(FED_BUILDNO)/
#FELIBDIR += /home/bel/mwiebel/lnx/workspace/local/trunk/libasl
#FELIBDIR = /common/usr/belap/workspace/febuild/workspace/local/libasl
FELIBDIR += $(FED_ROOT)/lib/msg/
# FE lib dir 64
FELIBDIR64 = $(FED_ROOT)/lib64/asl/$(FED_BUILDNO)/
FELIBDIR64 += $(FED_ROOT)/lib64/msg/

# -L path
FELIBDIRS = $(foreach lib, $(FELIBDIR), -L$(lib))
# -L path 64
FELIBDIRS64 = $(foreach lib, $(FELIBDIR64), -L$(lib))

# FE libs
FELIBS =
FELIBS +=  -laccmsg
FELIBS +=  -ldevice 
FELIBS +=  -ldevicefactory  -laccdata -los -lperiservice -lsubscriptionservice -lcorbaifc
FELIBS +=  -lnsrvclient -lnsrvtcpip 




# List of fe lib path
BUILD_FES =  {
BUILD_FES += $(foreach felib, $(FELIBDIRS), "$(felib)", )
BUILD_FES += NULL}


################################
# subdirectories and predefines
CLASSDIR = bin
JAVADIR = java
J_RES_DIR=resources
F_RES_DIR=resources
OBJ_DIR = obj
DEB_DIR = objd
OBJ64_DIR = obj64
DEB64_DIR = obj64d
DOC_DIR = doc
PDF_DIR = pdf
DOC_INDEX = html/index.html
LOCAL_DEPS=deps
TARGET_VERSION_DEFAULT=develop
TARGET_TYPE_DEFAULT=target-dflt
TARGET_TYPE_DEFAULT_64=target-dflt-64
TARGET_TYPE_DEBUG=target-dbg
TARGET_TYPE_DEBUG_64=target-dbg-64

BELA_ECLP_F_PROJ=$(PREFS_DIR)/f-project.project
BELA_ECLP_F_CPROJ=$(PREFS_DIR)/f-project.cproject

BELA_ECLP_C_PROJ=$(PREFS_DIR)/c-project.project
BELA_ECLP_C_CPROJ=$(PREFS_DIR)/c-project.cproject

BELA_ECLP_PROJ_0=$(PREFS_DIR)/eclipse-project0
BELA_ECLP_PROJ_1=$(PREFS_DIR)/eclipse-project1

BELA_ECLP_CLASSPATH_0=$(PREFS_DIR)/eclipse-classpath0
BELA_ECLP_CLASSPATH_1=$(PREFS_DIR)/eclipse-classpath1

####################################################################
# the default version (empty tag @version()) of the dependencies when we make the 
# default (develop) target
# this may be overwritten on make commandline
TARGET_DEP_VERSION_DEFAULT=ready

#####################################################################
# deternime the project dependencies as project without version
PROJDEPIES = $(foreach dep, $(DEPS), $(shell tagsubst -c -p "$(dep)" ) )

# determine and set the tag in the dependencies by the TARGET_VERSION we build
# the same for other makros which use version tags
ifdef TARGET_VERSION
# the target version is defined externally 
  ifneq ($(strip $(TARGET_VERSION)),$(TARGET_VERSION_DEFAULT))
  # it is not the default version so we use the same given tag version for all dependencies
  DEPENDENCIES = $(foreach dep, $(DEPS), $(shell tagsubst -r "$(PROJ_PATH)" -p "$(dep)" -v $(TARGET_VERSION) ) )
  MSGC_ABS_PATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(MSGC_PATH)" -v $(TARGET_VERSION))
  PROJ_GEN_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERGEN_PATH)" -v $(TARGET_VERSION))
  PROJ_DTD_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERDTD_PATH)" -v $(TARGET_VERSION))
  PROJ_INC_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERINC_PATH)" -v $(TARGET_VERSION))
  PROJ_JAR_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERJAR_PATH)" -v $(TARGET_VERSION))
  PROJ_DBGEN_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_DBGEN_PATH)" -v $(TARGET_VERSION))
  PROJ_IQDB_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_IQDB_DEP)" -d $(TARGET_VERSION))
  else
  # it is the default version so we use the user supplied dependency 
  # version if given with specifier @version(version)
  DEPENDENCIES = $(foreach dep, $(DEPS), $(shell tagsubst -r "$(PROJ_PATH)" -p "$(dep)" -d $(TARGET_DEP_VERSION_DEFAULT) ) )
  MSGC_ABS_PATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(MSGC_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT))
  PROJ_GEN_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERGEN_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT))
  PROJ_DTD_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERDTD_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT) )
  PROJ_INC_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERINC_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT))
  PROJ_JAR_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERJAR_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT))
  PROJ_DBGEN_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_DBGEN_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT))
  PROJ_IQDB_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_IQDB_DEP)" -d $(TARGET_DEP_VERSION_DEFAULT))
  endif
else
  # it is the default version so we use the user supplied dependency 
  # version if given with specifier @version(version)
  DEPENDENCIES = $(foreach dep, $(DEPS), $(shell tagsubst -r "$(PROJ_PATH)" -p "$(dep)" -d $(TARGET_DEP_VERSION_DEFAULT) ) )
  MSGC_ABS_PATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(MSGC_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT))
  PROJ_GEN_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERGEN_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT) )
  PROJ_DTD_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERDTD_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT) )
  PROJ_INC_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERINC_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT) )
  PROJ_JAR_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_XFERJAR_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT) )
  PROJ_DBGEN_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_DBGEN_PATH)" -d $(TARGET_DEP_VERSION_DEFAULT) )
  PROJ_IQDB_ABSPATH=$(BELA_BUILD_DIR)/$(shell tagsubst -p "$(PROJ_IQDB_DEP)" -d $(TARGET_DEP_VERSION_DEFAULT))
endif


BUILD_DEPS = {
BUILD_DEPS += $(foreach dep, $(DEPENDENCIES), "$(dep)", ) 
BUILD_DEPS += NULL}

# from the dependencies generate pathes and libs

empty :=
space := $(empty) $(empty) 
comma := $(empty),$(empty)


# user include directories
USERINCDIRS = $(foreach inc, $(USERINCS), -I$(inc) )

# 64-bit deps
DEPENDENCIES64 = $(foreach libdir, $(DEPENDENCIES), $(libdir)-64)

# ... the include path
BELAINCDIRS = $(foreach inc, $(DEPENDENCIES), -I$(BELA_BUILD_DIR)/$(inc))
BELAINCLIST_0 = $(foreach inc,$(DEPENDENCIES), $(BELA_BUILD_DIR)/$(inc))
BELAINCLIST = $(subst $(space),$(comma),$(BELAINCLIST_0))
# ... the libraries
BELALIBS = $(foreach libdir, $(DEPENDENCIES), $(wildcard $(BELA_BUILD_DIR)/$(libdir)/lib*.a))
# ... the libraries 64-bit
BELALIBS64 = $(foreach libdir, $(DEPENDENCIES64), $(wildcard $(BELA_BUILD_DIR)/$(libdir)/lib*.a))
# ... the jars
BELAJARS = $(foreach jardir, $(DEPENDENCIES), $(wildcard $(BELA_BUILD_DIR)/$(jardir)/*.jar))
# ... the classpath entries for eclipse projects
BELA_ECLIPSE_JARS = $(foreach jar, $(BELAJARS),$(space) <classpathentry kind="lib" path="$(jar)"/> )
BELA_ECLIPSE_JARS += $(foreach jar, $(USER_JARS),$(space) <classpathentry kind="lib" path="$(jar)"/> )

######################################
# source files
SRC_FILES=$(wildcard *.c *.h *.cc *.hh  *.f *.for)


######################################
# c-include path compiler command-line
INCS += -I .
INCS += -I ..
INCS += $(BELAINCDIRS) 
INCS += $(COMMONINCDIRS) 
INCS += $(USERINCDIRS) 
INCS += $(FEINCDIRS) 
INCS += -I $(GENINCDIR)
INCS += -I $(SYSINCDIR)
INCS += -I $(SQLINCDIR)

####################
# linker lib path
LDPATH += -L $(SYSLIBDIR)
LDPATH += -L $(X11LIBDIR)
LDPATH += -L $(GENLIBDIR)
LDPATH += -L $(SQLLIBDIR) 
LDPATH += $(FELIBDIRS)
# linker lib path 64-bit
LDPATH64 += -L $(SYSLIBDIR64)
LDPATH64 += -L $(X11LIBDIR64)
LDPATH64 += -L $(GENLIBDIR64)
LDPATH64 += -L $(SQLLIBDIR64) 
LDPATH64 += $(FELIBDIRS64)

#################################
# C linker flags
LDFLAGS += -rdynamic --export-dynamic
LDFLAGS += -m32
# C linker flags 64-bit
LDFLAGS64 += -rdynamic --export-dynamic
LDFLAGS64 += 

#####################################
# Intel Fortran Linker Flags
LFLAGS += -reentrancy threaded -reentrancy async 
LFLAGS += -z muldefs
LFLAGS += -vms  -fexceptions -fpic -Wl,-E
#-Wl,-rdynamic

#####################################
# libraries to link
LINKEDLIBS += -Wl,--start-group $(BELALIBS) -Wl,--end-group
# libraries 64-bit to link 
LINKEDLIBS64 += -Wl,--start-group $(BELALIBS64) -Wl,--end-group

ifeq ($(strip $(LINK_FELIBS)),false)
LINKEDLIBS += 
LINKEDLIBS64 += 
else
LINKEDLIBS += $(FELIBS)
LINKEDLIBS64 += $(FELIBS)
endif


ifeq ($(strip $(LINK_SYS1LIBS)),false)
LINKEDLIBS += 
LINKEDLIBS64 += 
else
LINKEDLIBS += $(SYS1LIBS)
LINKEDLIBS64 += $(SYS1LIBS)
endif

LINKEDLIBS += $(USERLIBS)
LINKEDLIBS64 += $(USERLIBS)
LINKEDLIBS += $(SYS0LIBS)
LINKEDLIBS64 += $(SYS0LIBS)


TAGS_DIR += /usr/include  $(BELAINCLIST_0)
MAKEFILE=makefile

############################
# fortran compiler and flags
FC = ifort
#FFLAGS += -fpp
FFLAGS += -vms 
FFLAGS += -save
FFLAGS += -nogen-interfaces
FFLAGS += -zero
FFLAGS += -check uninit 
FFLAGS += -warn 
FFLAGS += -warn noerrors
FFLAGS += -warn nostderrors
FFLAGS += -warn nounused
FFLAGS += -warn nousage
FFLAGS += -align all
FFLAGS += -align rec4byte
FFLAGS += -fexceptions
FFLAGS += -fpic
FFLAGS += -reentrancy threaded 
FFLAGS += -reentrancy async 
FFLAGS += -assume buffer 
FFLAGS += -traceback 
FFLAGS += -extend_source 
FFLAGS += $(INCS)

REDEFINE_FILE=decx.rdf
REDEFINE_FILE2=decx2.rdf
REDEFINE_FILE3=gen.rdf
PUB_F77_HEADER=$(filter %.f, $(PUB_HEADER) )

###########################
# C compiler and flags
CC=gcc
CFLAGS += -D_REENTRANT
CFLAGS += -fexceptions 
CFLAGS += -fPIC
CFLAGS += -Wall
CFLAGS += $(INCS)
# machine flag to produce 32-bit code
CM_FLAG = -m32 

CXX = g++


CFLAGS += -DVERS_BUILD_ID='$(BUILD_VERSION)'
CFLAGS += -DVERS_BUILD_TIME='$(BUILD_TIME)'
CFLAGS += -DVERS_BUILD_NO='$(BUILD_NUMBER)' 
CFLAGS += -DVERS_BUILD_DEPS='$(BUILD_DEPS)' 
CFLAGS += -DVERS_BUILD_FES='$(BUILD_FES)' 

#######
# Motif
#UIL = myuil
UIL = uil32
UIL2FIN = uil2fin
UILINC = -I. -I$(MOTIFINCDIR) $(BELAINCDIRS)

######
# java
JC=javac
JAR=jar
JARFLAGS=cf
JFLAGS= -nowarn -implicit:none 

#########
# install
INSTALL=install
INSTFLAGS += -p -v --mode=775

#########
# mode of resource files
RES_MODE=775

#####################
# oracle pre-compiler
OPC = proc
OPCOPTS = "sys_include=(..,/usr/include,/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/,$(BELAINCLIST))"


#########################
# set default build info
ifndef BUILD_NUMBER
  BUILD_NUMBER="?"
endif

ifndef BUILD_VERSION
  BUILD_VERSION="V_develop"
endif

ifndef BUILD_REPOS
  BUILD_REPOS="?"
endif

ifndef BUILD_TIME
  BUILD_TIME="$(shell date)"
endif

# default version file which is to generated from version.c
BUILD_VERSION_DAT=belap-version.o

.PHONY: default all clean new save src header exe lib libd tool util1 exe scripts dtd jar exe_global


ifdef THIS_IS_ONLY_FOR_DOCUMENTATION
\endif  make
*/
endif


Generated on 25 Feb 2014 for prefs by  doxygen 1.4.7