X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fsrc%2FMakefile;h=eb7e69e48fab9c867f4b96e470c63fdd6d2ab232;hb=bad3af93817e3f922c832f9ff1e2cecf4e8aa9d4;hp=bd8ae666729588cea756459fe9ea422986546564;hpb=ab75da2557cefa3beb853b46ea7f230798f61310;p=melted diff --git a/mlt++/src/Makefile b/mlt++/src/Makefile index bd8ae66..eb7e69e 100644 --- a/mlt++/src/Makefile +++ b/mlt++/src/Makefile @@ -1,41 +1,57 @@ include ../config.mak -CXXFLAGS = -Wall -pthread `mlt-config --cflags` -LDFLAGS = `mlt-config --libs` INSTALL = install -TARGET = libmlt++.so +ifneq ($(targetos), Darwin) +NAME = libmlt++$(LIBSUF) +TARGET = $(NAME).$(version) +LIBFLAGS += -Wl,-soname,$(TARGET) +else +NAME = libmlt++$(LIBSUF) +TARGET = libmlt++.$(version)$(LIBSUF) +LIBFLAGS += -install_name $(libdir)/$(TARGET) +endif OBJS = MltConsumer.o \ + MltDeque.o \ + MltEvent.o \ MltFactory.o \ MltField.o \ MltFilter.o \ MltFilteredConsumer.o \ MltFrame.o \ + MltGeometry.o \ + MltMiracle.o \ MltMultitrack.o \ + MltParser.o \ MltPlaylist.o \ MltProducer.o \ MltProperties.o \ + MltPushConsumer.o \ + MltResponse.o \ MltService.o \ + MltTokeniser.o \ MltTractor.o \ - MltTransition.o + MltTransition.o SRCS = $(OBJS:.o=.cpp) - HEADERS = Mlt.h $(OBJS:.o=.h) -CC=g++ - all: $(TARGET) $(TARGET): $(OBJS) - $(CC) -shared -o $@ $(OBJS) $(LDFLAGS) + $(CXX) $(LIBFLAGS) -o $@ $(OBJS) $(LDFLAGS) + ln -sf $(TARGET) $(NAME) clean: - $(RM) $(OBJS) $(TARGET) + $(RM) $(OBJS) $(TARGET) $(NAME) + +distclean: clean install: - $(INSTALL) -m 755 $(TARGET) $(prefix)/lib - $(INSTALL) -d "$(prefix)/include/mlt++" - $(INSTALL) -m 644 $(HEADERS) "$(prefix)/include/mlt++" + $(INSTALL) -d "$(DESTDIR)$(libdir)" + $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(libdir) + ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) + $(INSTALL) -d "$(DESTDIR)$(prefix)/include/mlt++" + $(INSTALL) -m 644 $(HEADERS) "$(DESTDIR)$(prefix)/include/mlt++" /sbin/ldconfig || true