+ DESTDIR patch from Anthony Green (green at redhat dot com) - many thanks :-)
[melted] / src / modules / sox / Makefile
index 4c2ef83..33e9865 100644 (file)
@@ -1,20 +1,20 @@
 include ../../../config.mak
 
-TARGET = ../libmltsox.so
+TARGET = ../libmltsox$(LIBSUF)
 
 OBJS = factory.o \
           filter_sox.o 
 
-CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I../../ -Wall -g 
-
-LDFLAGS = -lst
+CFLAGS += `libst-config --cflags` -I../../ 
+LDFLAGS += -lst `libst-config --libs`
+LDFLAGS += -L../../framework -lmlt
 
 SRCS := $(OBJS:.o=.c)
 
 all:   $(TARGET)
 
 $(TARGET): $(OBJS)
-               $(CC) -shared -o $@ $(OBJS) $(LDFLAGS)
+               $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
 
 depend:        $(SRCS)
                $(CC) -MM $(CFLAGS) $^ 1>.depend
@@ -26,7 +26,7 @@ clean:
                rm -f $(OBJS) $(TARGET)
 
 install: all
-       install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
+       install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules"
 
 ifneq ($(wildcard .depend),)
 include .depend