Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

generate a library

ekeom
Novice
552 Views
Hello,

I would like to generate a *.so library. To do this I had a makefile. The complitaion work but no *.so file is generated. Can someone tell me how to do this.

Best regards,

Didace

Here is my makefile
________________________________________________________________

.SUFFIXES: .f90 .mod
FORTRAN=ifort
LINK=$(FORTRAN)
FFLAGS = -O3 -fpp -g
LDFLAGS= -no -ipo -shared

.f90.o:
$(FORTRAN) $(FFLAGS) -c $< -o $@

.f90.mod:
$(FORTRAN) $(FFLAGS) -c $<

.f.o:
$(FORTRAN) $(FFLAGS) -c $<

.mod.o:
echo

OBJS_USER_GREEN=
user_green_212_m.o
user_green_222_m.o
user_green_252_m.o
user_green_312_m.o
user_green_322_m.o
user_green_352_m.o

all: user_green

user_green: $(OBJS_USER_GREEN)
$(LINK) $(OBJS_USER_GREEN) -o $@ $(LDFLAGS)

clean:
rm -f $(OBJS_USER_GREEN) user_green
rm *.mod
_________________________________________________________________
0 Kudos
2 Replies
TimP
Honored Contributor III
552 Views
You would require addition in your Makefile of the commands for making a shared library. It's the same as any compiler on a similar linux system. See, for example, http://www.intel.com/cd/ids/developer/asmo-na/eng/52635.htm?prn=y
0 Kudos
ekeom
Novice
552 Views
Hello,

Thank for your answer. I think should specify the full name user_green.so!

.
.
.
all: user_green.so

user_green.so: $(OBJS_USER_GREEN)
$(LINK) $(OBJS_USER_GREEN) -o $@ $(LDFLAGS)
.
.
.

Best regards,

Didace
0 Kudos
Reply