X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fvalerie%2FMakefile;h=301918394498368962dd2437b3eeebd94c266636;hb=ae867071f780e9c61a5013f6f7452850b4151e07;hp=7121bb1c5a2e04435aa1abadf2daf059c7806d76;hpb=a4799884f16e60db669cdf7ce6e15f160e3c7613;p=melted diff --git a/src/valerie/Makefile b/src/valerie/Makefile index 7121bb1..3019183 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -1,6 +1,14 @@ include ../../config.mak -TARGET = libvalerie.so +ifneq ($(targetos), Darwin) +NAME = libvalerie$(LIBSUF) +TARGET = $(NAME).$(version) +SHFLAGS += -Wl,-soname,$(TARGET) +else +NAME = libvalerie$(LIBSUF) +TARGET = libvalerie.$(version)$(LIBSUF) +SHFLAGS += -install_name $(libdir)/$(TARGET) +endif OBJS = valerie.o \ valerie_notifier.o \ @@ -12,38 +20,41 @@ OBJS = valerie.o \ valerie_remote.o \ valerie_socket.o +INCS = valerie.h \ + valerie_notifier.h \ + valerie_parser.h \ + valerie_remote.h \ + valerie_response.h \ + valerie_socket.h \ + valerie_status.h \ + valerie_tokeniser.h \ + valerie_util.h + SRCS := $(OBJS:.o=.c) -LDFLAGS=-ldv -lpthread +CFLAGS += -I.. $(RDYNAMIC) +LDFLAGS += -L../framework -lmlt -lpthread all: $(TARGET) $(TARGET): $(OBJS) - $(CC) -shared -o $@ $(OBJS) $(LDFLAGS) + $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS) + ln -sf $(TARGET) $(NAME) 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) $(prefix)/lib/libvalerie.so - mkdir -p "$(prefix)/include/mlt/valerie" - install -m 644 \ - valerie.h \ - valerie_notifier.h \ - valerie_parser.h \ - valerie_remote.h \ - valerie_response.h \ - valerie_socket.h \ - valerie_status.h \ - valerie_tokeniser.h \ - valerie_util.h \ - "$(prefix)/include/mlt/valerie" + install -m 755 $(TARGET) $(DESTDIR)$(libdir) + ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) + mkdir -p "$(DESTDIR)$(prefix)/include/mlt/valerie" + install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/valerie" ifneq ($(wildcard .depend),) include .depend