X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmodules%2Fsdl%2FMakefile;h=6fab5d41ad7fb9b69f32b63f349367a7826d9c88;hb=ad5cb839877bd25d3f025207f7c55689b48e63df;hp=b5275940e148e92a966778ffc0f9d731dde118af;hpb=4ed2712bbdac2182c7c0d6477ac77c9f92aaf02a;p=mlt diff --git a/src/modules/sdl/Makefile b/src/modules/sdl/Makefile index b5275940..6fab5d41 100644 --- a/src/modules/sdl/Makefile +++ b/src/modules/sdl/Makefile @@ -1,29 +1,61 @@ +CFLAGS += -I../.. -TARGET = ../libmltsdl.so +LDFLAGS += -L../../framework -lmlt -lpthread -lm + +include ../../../config.mak + +include config.mak + +TARGET = ../libmltsdl$(LIBSUF) OBJS = factory.o \ - consumer_sdl.o + consumer_sdl.o \ + consumer_sdl_audio.o \ + consumer_sdl_preview.o \ + consumer_sdl_still.o + +ifeq ($(targetos),Darwin) +CFLAGS += -ObjC +LDFLAGS += -lobjc -framework Foundation +else ifneq ($(targetos), MinGW) +LDFLAGS += -lX11 +endif -CFLAGS = -I../../ `sdl-config --cflags` -Wall -g -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS += `sdl-config --cflags` -LDFLAGS= `sdl-config --libs` +LDFLAGS += `sdl-config --libs` + +ifeq ($(WITH_SDL_IMAGE),1) +OBJS += producer_sdl_image.o +CFLAGS += -DWITH_SDL_IMAGE +LDFLAGS += -lSDL_image +endif SRCS := $(OBJS:.o=.c) +ifeq ($(targetos),Darwin) +OBJS += consumer_sdl_osx.o +SRCS += consumer_sdl_osx.m consumer_sdl_osx.h +endif all: $(TARGET) $(TARGET): $(OBJS) - $(CC) -shared -o $@ $(OBJS) $(LDFLAGS) + $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS) depend: $(SRCS) $(CC) -MM $(CFLAGS) $^ 1>.depend -dist-clean: clean +distclean: clean rm -f .depend clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt" + install -d "$(DESTDIR)$(datadir)/mlt/sdl" + install -m 644 *.yml "$(DESTDIR)$(datadir)/mlt/sdl" + ifneq ($(wildcard .depend),) include .depend endif