+ Added producer_sdl_image as an alternative image and image sequence producer
[melted] / src / modules / sdl / Makefile
index b527594..929c03f 100644 (file)
@@ -1,19 +1,37 @@
+include ../../../config.mak
 
-TARGET = ../libmltsdl.so
+include config.mak
+
+TARGET = ../libmltsdl$(LIBSUF)
 
 OBJS = factory.o \
-          consumer_sdl.o 
+          consumer_sdl.o \
+          consumer_sdl_preview.o \
+          consumer_sdl_still.o 
+
+ifeq ($(targetos),Darwin)
+       CFLAGS +=-ObjC
+       LDFLAGS +=-lobjc -framework Foundation
+endif
+
+CFLAGS +=-I../.. `sdl-config --cflags`
 
-CFLAGS = -I../../ `sdl-config --cflags` -Wall -g -D_FILE_OFFSET_BITS=64 -pthread
+LDFLAGS +=`sdl-config --libs`
 
-LDFLAGS= `sdl-config --libs`
+LDFLAGS +=-L../../framework -lmlt
+
+ifeq ($(WITH_SDL_IMAGE),1)
+OBJS += producer_sdl_image.o
+CFLAGS += -DWITH_SDL_IMAGE
+LDFLAGS += -lSDL_image
+endif
 
 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 +42,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