Added gfortran dependency for LSB/lsbcc.
authorZhang Xianyi <traits.zhang@gmail.com>
Tue, 22 Oct 2013 05:24:47 +0000 (13:24 +0800)
committerZhang Xianyi <traits.zhang@gmail.com>
Tue, 22 Oct 2013 05:24:47 +0000 (13:24 +0800)
Makefile.system
exports/Makefile

index 858160f..1e9248a 100644 (file)
@@ -470,10 +470,8 @@ CCOMMON_OPT += -DF_INTERFACE_GFORT
 FCOMMON_OPT += -Wall
 #Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
 ifneq ($(NO_LAPACK), 1)
-ifneq ($(C_COMPILER), LSB)
 EXTRALIB += -lgfortran 
 endif
-endif
 ifdef NO_BINARY_MODE
 ifeq ($(ARCH), mips64)
 ifdef BINARY64
index 0bc9ec6..780b0dc 100644 (file)
@@ -124,14 +124,17 @@ ifeq ($(OSNAME), Linux)
 so : ../$(LIBSONAME)
 
 ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
+ifneq ($(C_COMPILER), LSB)
        $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
        -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
        -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
-ifneq ($(C_COMPILER), LSB)
        $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
 else
-#Use FC on LSB
-       $(FC) $(FFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
+#for LSB
+       env LSBCC_SHAREDLIBS=gfortran $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
+       -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
+       -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
+       $(FC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
 endif
        rm -f linktest