X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fvalerie%2FMakefile;h=52b61e15a59265272e3579254411b1a195795ad4;hb=b9998ddda843ad18ad2c8e327523dac4f28ebe1f;hp=7322577fb736a8f05707808c83037331b8424a80;hpb=0b288164cbeb9a3c98107d439d86844be13ba910;p=melted diff --git a/src/valerie/Makefile b/src/valerie/Makefile index 7322577..52b61e1 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -1,5 +1,16 @@ +include ../../config.mak -TARGET = libvalerie.so +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 \ @@ -11,30 +22,50 @@ OBJS = valerie.o \ valerie_remote.o \ valerie_socket.o -SRCS := $(OBJS:.o=.c) +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 -CFLAGS=-O3 -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +SRCS := $(OBJS:.o=.c) -LDFLAGS=-ldv -lpthread +CFLAGS += -I.. $(RDYNAMIC) -ifeq ($(MLT_GPROF),true) -CFLAGS+=-p -LDFLAGS+=-p -endif +LDFLAGS += -L../framework -lmlt -lpthread all: $(TARGET) $(TARGET): $(OBJS) - $(CC) -shared -o $@ $(OBJS) $(LDFLAGS) + $(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) + 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