- Removed 'resize' property logic and width/height confusion
[melted] / src / modules / sdl / Makefile
index 5107441..f9aac55 100644 (file)
@@ -1,19 +1,30 @@
+include ../../../config.mak
 
-TARGET = libmltsdl.so
+TARGET = ../libmltsdl$(LIBSUF)
 
 OBJS = factory.o \
-          consumer_sdl.o 
+          consumer_sdl.o \
+          consumer_sdl_preview.o \
+          consumer_sdl_still.o 
 
-CFLAGS=-I../../ `sdl-config --cflags` -Wall -g -D_FILE_OFFSET_BITS=64 -pthread
+ifeq ($(targetos),Darwin)
+       CFLAGS +=-ObjC
+       LDFLAGS +=-lobjc -framework Foundation
+endif
+
+CFLAGS +=-I../.. `sdl-config --cflags`
+
+LDFLAGS +=`sdl-config --libs`
+
+LDFLAGS +=-L../../framework -lmlt
 
-LDFLAGS= `sdl-config --libs`
 
 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
@@ -24,6 +35,9 @@ dist-clean:   clean
 clean: 
                rm -f $(OBJS) $(TARGET)
 
+install: all
+       install -m 755 $(TARGET) "$(prefix)/share/mlt/modules"
+
 ifneq ($(wildcard .depend),)
 include .depend
 endif