+ Added a --libdir switch to the configure and build and fixed test case compilation
[melted] / mlt++ / src / Makefile
index 33ebef3..5d205b8 100644 (file)
@@ -1,9 +1,7 @@
 include ../config.mak
-CXXFLAGS = -Wall -fPIC -DPIC -pthread `mlt-config --cflags`
-LDFLAGS = `mlt-config --libs` `mlt-config miracle --libs`
 INSTALL = install
 
-TARGET = libmlt++.so
+TARGET = libmlt++$(LIBSUF)
 
 OBJS = MltConsumer.o \
           MltDeque.o \
@@ -20,6 +18,7 @@ OBJS = MltConsumer.o \
           MltPlaylist.o \
           MltProducer.o \
           MltProperties.o \
+          MltPushConsumer.o \
           MltResponse.o \
           MltService.o \
           MltTokeniser.o \
@@ -35,14 +34,15 @@ CC=g++
 all:           $(TARGET)
 
 $(TARGET):     $(OBJS)
-       $(CC) -shared -o $@ $(OBJS) $(LDFLAGS)
+       $(CC) $(LIBFLAGS) -o $@ $(OBJS) $(LDFLAGS)
 
 clean:
        $(RM) $(OBJS) $(TARGET)
 
 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)
+       $(INSTALL) -d "$(DESTDIR)$(prefix)/include/mlt++"
+       $(INSTALL) -m 644 $(HEADERS) "$(DESTDIR)$(prefix)/include/mlt++"
        /sbin/ldconfig || true