#!/bin/bash
+export version=0.2.5
+export soversion=0
+
show_help()
{
cat << EOF
{
(
echo "version=$version"
+ echo "soversion=$soversion"
echo "prefix=$prefix"
echo "libdir=$libdir"
echo "bindir=$prefix/bin"
export prefix=/usr/local
export libdir=""
export help=0
-export version=0.2.5
export debug=true
export mmx=true
export gpl=false
ifneq ($(targetos), Darwin)
NAME = libmlt$(LIBSUF)
TARGET = $(NAME).$(version)
-SHFLAGS += -Wl,-soname,$(TARGET)
+SONAME = $(NAME).$(soversion)
+SHFLAGS += -Wl,-soname,$(SONAME)
else
NAME = libmlt$(LIBSUF)
TARGET = libmlt.$(version)$(LIBSUF)
-SHFLAGS += -install_name $(libdir)/$(TARGET)
+SONAME = libmlt.$(soversion)$(LIBSUF)
+SHFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compatibility_version $(soversion)
endif
OBJS = mlt_frame.o \
$(TARGET): $(OBJS)
$(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
ln -sf $(TARGET) $(NAME)
+ ln -sf $(TARGET) $(SONAME)
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
install:
install -d $(DESTDIR)$(libdir)
install -m 755 $(TARGET) $(DESTDIR)$(libdir)
+ ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME)
ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME)
install -d "$(DESTDIR)$(prefix)/include/mlt/framework"
install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/framework"
uninstall:
rm -f "$(DESTDIR)$(libdir)/$(TARGET)"
+ rm -f "$(DESTDIR)$(libdir)/$(SONAME)"
rm -f "$(DESTDIR)$(libdir)/$(NAME)"
rm -rf "$(DESTDIR)$(prefix)/include/mlt/framework"
#ifndef _MLT_H_
#define _MLT_H_
+#define LIBMLT_VERSION_INT ((0<<16)+(2<<8)+5)
+#define LIBMLT_VERSION 0.2.5
+
#ifdef __cplusplus
extern "C"
{
ifneq ($(targetos), Darwin)
LIBNAME = libmiracle$(LIBSUF)
LIBTARGET = $(LIBNAME).$(version)
-SHFLAGS += -Wl,-soname,$(LIBTARGET)
+LIBSONAME = $(LIBNAME).$(soversion)
+SHFLAGS += -Wl,-soname,$(LIBSONAME)
else
LIBNAME = libmiracle$(LIBSUF)
LIBTARGET = libmiracle.$(version)$(LIBSUF)
-SHFLAGS += -install_name $(libdir)/$(LIBTARGET)
+LIBSONAME = libmiracle.$(soversion)$(LIBSUF)
+SHFLAGS += -install_name $(libdir)/$(LIBSONAME) -current_version $(version) -compatibility_version $(soversion)
endif
APP_OBJS = miracle.o
$(LIBTARGET): $(LIB_OBJS)
$(CC) $(SHFLAGS) -o $@ $(LIB_OBJS) $(LDFLAGS)
ln -sf $(LIBTARGET) $(LIBNAME)
+ ln -sf $(LIBTARGET) $(LIBSONAME)
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
install -d "$(DESTDIR)$(bindir)"
install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)"
install -m 755 $(LIBTARGET) $(DESTDIR)$(libdir)
+ ln -sf $(LIBTARGET) $(DESTDIR)$(libdir)/$(LIBSONAME)
ln -sf $(LIBTARGET) $(DESTDIR)$(libdir)/$(LIBNAME)
mkdir -p "$(DESTDIR)$(prefix)/include/mlt/miracle"
install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/miracle"
uninstall:
rm -f "$(DESTDIR)$(bindir)/$(TARGET)"
rm -f "$(DESTDIR)$(libdir)/$(LIBTARGET)"
+ rm -f "$(DESTDIR)$(libdir)/$(LIBSONAME)"
rm -f "$(DESTDIR)$(libdir)/$(LIBNAME)"
rm -rf "$(DESTDIR)$(prefix)/include/mlt/miracle"
ifneq ($(targetos), Darwin)
NAME = libvalerie$(LIBSUF)
TARGET = $(NAME).$(version)
-SHFLAGS += -Wl,-soname,$(TARGET)
+SONAME = $(NAME).$(soversion)
+SHFLAGS += -Wl,-soname,$(SONAME)
else
NAME = libvalerie$(LIBSUF)
TARGET = libvalerie.$(version)$(LIBSUF)
-SHFLAGS += -install_name $(libdir)/$(TARGET)
+SONAME = libmlt.$(soversion)$(LIBSUF)
+SHFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compatibility_version $(soversion)
endif
OBJS = valerie.o \
$(TARGET): $(OBJS)
$(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
ln -sf $(TARGET) $(NAME)
+ ln -sf $(TARGET) $(SONAME)
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
install: all
install -m 755 $(TARGET) $(DESTDIR)$(libdir)
+ ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME)
ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME)
mkdir -p "$(DESTDIR)$(prefix)/include/mlt/valerie"
install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/valerie"
uninstall:
rm -f "$(DESTDIR)$(libdir)/$(TARGET)"
+ rm -f "$(DESTDIR)$(libdir)/$(SONAME)"
rm -f "$(DESTDIR)$(libdir)/$(NAME)"
rm -rf "$(DESTDIR)$(prefix)/include/mlt/valerie"