Last-Update: 2016-01-08
Upstream only builds a static library, this adds a shared one.
Gbp-Pq: Name make_shared_lib
CC= gcc
-CFLAGS= -g -Wall -O2 -Wno-unused-function #-fno-inline-functions -fno-inline-functions-called-once
+CFLAGS= -g -Wall -O2 -fPIC #-fno-inline-functions -fno-inline-functions-called-once
CPPFLAGS=
INCLUDES=
OBJS= kthread.o misc.o \
unitig.o mag.o bubble.o ksw.o
PROG= fml-asm
LIBS= -lm -lz -lpthread
+SONUMBER=0
.SUFFIXES:.c .o
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $< -o $@
-all:$(PROG)
+all:$(PROG) libfml.so.$(SONUMBER)
fml-asm:libfml.a example.o
$(CC) $(CFLAGS) $^ -o $@ -L. -lfml $(LIBS)
libfml.a:$(OBJS)
$(AR) -csru $@ $(OBJS)
+libfml.so.$(SONUMBER): $(OBJS)
+ $(CC) -shared -o $@ $(OBJS) -fPIC -Wl,-soname,libfml.so.$(SONUMBER) $(LIBS) $(LDFLAGS)
+
+
clean:
rm -fr gmon.out *.o ext/*.o a.out $(PROG) *~ *.a *.dSYM session*