29 |
UNAMEA=`uname -a` |
UNAMEA=`uname -a` |
30 |
TODAY=`date` |
TODAY=`date` |
31 |
# F77 |
# F77 |
32 |
|
ifeq ($(GCC4),) |
33 |
|
export GCCVERS=$(shell echo `gcc -dumpversion | sed 's/\./\ /g'`) |
34 |
|
export GCCVERMAJ=$(word 1,$(GCCVERS)) |
35 |
|
export GCC4=$(shell echo `echo "${GCCVERMAJ} > 3" |bc -l`) |
36 |
|
endif |
37 |
|
ifeq ($(GCC4),1) |
38 |
|
F77=gfortran |
39 |
|
LG2C=-lgfortran |
40 |
|
EXTRAOPT= |
41 |
|
else |
42 |
F77=g77 |
F77=g77 |
43 |
|
LG2C=-lg2c |
44 |
|
EXTRAOPT=-Wno-globals -fvxt |
45 |
|
endif |
46 |
#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash |
#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash |
47 |
F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT} |
F77FLAGS= -Wall -funroll-loops -fPIC $(EXTRAOPT) -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT} |
48 |
|
#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT} |
49 |
# C++ |
# C++ |
50 |
CXX=g++ |
CXX=g++ |
51 |
#CXXFLAGS=-Wall -O -fPIC -pthread -g |
#CXXFLAGS=-Wall -O -fPIC -pthread -g |
143 |
${LIBF77LIBS}: ${LIBF77OBJS} |
${LIBF77LIBS}: ${LIBF77OBJS} |
144 |
@(${EYELLOW} " F77 shared library --------------------------") |
@(${EYELLOW} " F77 shared library --------------------------") |
145 |
@(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET}) |
146 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ -lg2c `doc/cernlib_pam mathlib` |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ ${LG2C} `doc/cernlib_pam mathlib` |
147 |
|
|
148 |
|
|
149 |
${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} |
${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} |
168 |
# create .so |
# create .so |
169 |
# |
# |
170 |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
171 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `doc/cernlib_pam mathlib` 1>/dev/null |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ ${LG2C} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `doc/cernlib_pam mathlib` 1>/dev/null |
172 |
# @ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
# @ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
173 |
|
|
174 |
${LIBCPPLIBS}: ${LIBCPPSRCS} |
${LIBCPPLIBS}: ${LIBCPPSRCS} |
181 |
# create .so |
# create .so |
182 |
# |
# |
183 |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
184 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_INC} ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o 1>/dev/null |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ ${LG2C} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_INC} ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o 1>/dev/null |
185 |
|
|
186 |
|
|
187 |
${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS} |
${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS} |