X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fvalerie%2FMakefile;h=0cb34508ee8df2ba76f0be22d6057f40902e501a;hb=ced3d0b8c0520e4c8208166e3218e0caacba1efa;hp=64c2fc11009349f258b26b29720a546e17a44404;hpb=64f9aa2d35148116826be20b153a4231e6829243;p=melted diff --git a/src/valerie/Makefile b/src/valerie/Makefile index 64c2fc1..0cb3450 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -1,6 +1,16 @@ include ../../config.mak -TARGET = libvalerie$(LIBSUF) +ifneq ($(targetos), Darwin) +NAME = libvalerie$(LIBSUF) +TARGET = $(NAME).$(version) +SONAME = $(NAME).$(soversion) +SHFLAGS += -Wl,-soname,$(SONAME) +else +NAME = libvalerie$(LIBSUF) +TARGET = libvalerie.$(version)$(LIBSUF) +SONAME = libvalerie.$(soversion)$(LIBSUF) +SHFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compatibility_version $(soversion) +endif OBJS = valerie.o \ valerie_notifier.o \ @@ -31,21 +41,31 @@ all: $(TARGET) $(TARGET): $(OBJS) $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS) + ln -sf $(TARGET) $(NAME) + ln -sf $(TARGET) $(SONAME) depend: $(SRCS) $(CC) -MM $(CFLAGS) $^ 1>.depend -dist-clean: clean +distclean: clean rm -f .depend clean: - rm -f $(OBJS) $(TARGET) + rm -f $(OBJS) $(TARGET) $(NAME) install: all - install -m 755 $(TARGET) $(DESTDIR)$(libdir)/libvalerie$(LIBSUF) + 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" + ifneq ($(wildcard .depend),) include .depend endif