:78 Function create_function() is deprecated [8192]

Add a makefile with xlf compilers and debug options.

Bruno Mundim [2017-01-02 17:57:22]
Add a makefile with xlf compilers and debug options.
Filename
lib/Makefile
lib/Makefile.xlf_O0
diff --git a/lib/Makefile b/lib/Makefile
index c74fa62..500a8c6 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,11 +1,11 @@
-FC      = gfortran -c
+FC      = xlf_r -c
 #FC      = ifort -c
-FCFLAGS = -O2
+FCFLAGS = -O0 -g -q64 -qarch=pwr7 -qtune=pwr7

-SHRLD    = gcc
-SHRFLAGS = -fPIC
-SHARED   = -shared
-SHRLIB   = -lm -lgfortran
+SHRLD    = xlf_r
+SHRFLAGS = -qpic
+SHARED   = -qmkshrobj
+SHRLIB   =

 TAR       = tar
 AR        = ar
diff --git a/lib/Makefile.xlf_O0 b/lib/Makefile.xlf_O0
new file mode 100644
index 0000000..500a8c6
--- /dev/null
+++ b/lib/Makefile.xlf_O0
@@ -0,0 +1,65 @@
+FC      = xlf_r -c
+#FC      = ifort -c
+FCFLAGS = -O0 -g -q64 -qarch=pwr7 -qtune=pwr7
+
+SHRLD    = xlf_r
+SHRFLAGS = -qpic
+SHARED   = -qmkshrobj
+SHRLIB   =
+
+TAR       = tar
+AR        = ar
+ARFLAGS   = -crusv
+
+#------------------------------ L-BFGS-B ------------------------------#
+
+LBFGSB = Lbfgsb.3.0
+
+OBJLBFGSB = $(LBFGSB)/blas.o    $(LBFGSB)/lbfgsb.o \
+            $(LBFGSB)/linpack.o $(LBFGSB)/timer.o
+
+PICLBFGSB = $(LBFGSB)/blas_pic.o    $(LBFGSB)/lbfgsb_pic.o \
+            $(LBFGSB)/linpack_pic.o $(LBFGSB)/timer_pic.o
+
+TRGLBFGSB = liblbfgsb.a
+SHRLBFGSB = liblbfgsb.so
+
+#----------------------------------------------------------------------#
+#                                Rules                                 #
+#----------------------------------------------------------------------#
+
+.SUFFIXES: .o .f $(SUFFIXES)
+.PHONY : all static shared clean veryclean
+
+all    : $(LBFGSB) $(TRGLBFGSB) $(SHRLBFGSB)
+static : $(LBFGSB) $(TRGLBFGSB)
+shared : $(LBFGSB) $(SHRLBFGSB)
+lbfgsb : $(LBFGSB) $(TRGLBFGSB) $(SHRLBFGSB)
+
+%.o : %.f Makefile
+	$(FC) $(FCFLAGS) $< -o $*.o
+
+%_pic.o : %.f
+	$(FC) $(FCFLAGS) $(SHRFLAGS) -o $@ $<
+
+$(LBFGSB) : $(LBFGSB).tar.gz
+	$(TAR) xfvz $<
+
+$(TRGLBFGSB) : $(OBJLBFGSB) Makefile
+	$(AR) $(ARFLAGS) $@ $(OBJLBFGSB)
+
+$(SHRLBFGSB) : $(PICLBFGSB) Makefile
+	$(SHRLD) $(SHARED) $(PICLBFGSB) $(SHRLIB) -o $@
+
+clean :
+	if [ -d $(LBFGSB) ]; then rm -rf $(LBFGSB); fi
+	for f in $(OBJLBFGSB); do if [ -e $$f ]; then rm -f $$f; fi; done
+	for f in $(PICLBFGSB); do if [ -e $$f ]; then rm -f $$f; fi; done
+	for f in *~; do rm -f $$f; done
+
+veryclean:
+	if [ -d $(LBFGSB) ]; then rm -rf $(LBFGSB); fi
+	if [ -e $(TRGLBFGSB) ]; then rm -f $(TRGLBFGSB); fi
+	for f in $(OBJLBFGSB); do if [ -e $$f ]; then rm -f $$f; fi; done
+	for f in $(PICLBFGSB); do if [ -e $$f ]; then rm -f $$f; fi; done
+	for f in *~; do rm -f $$f; done
ViewGit