]> git.sesse.net Git - mlt/blob - src/modules/sdl/Makefile
Initial port to Windows using MinGW.
[mlt] / src / modules / sdl / Makefile
1 CFLAGS += -I../..
2
3 LDFLAGS += -L../../framework -lmlt -lpthread -lm
4
5 include ../../../config.mak
6
7 include config.mak
8
9 TARGET = ../libmltsdl$(LIBSUF)
10
11 OBJS = factory.o \
12            consumer_sdl.o \
13            consumer_sdl_audio.o \
14            consumer_sdl_preview.o \
15            consumer_sdl_still.o 
16
17 ifeq ($(targetos),Darwin)
18 CFLAGS += -ObjC
19 LDFLAGS += -lobjc -framework Foundation
20 else ifeq ($(targetos), Linux|FreeBSD)
21 LDFLAGS += -lX11
22 endif
23
24 CFLAGS += `sdl-config --cflags`
25
26 LDFLAGS += `sdl-config --libs`
27
28 ifeq ($(WITH_SDL_IMAGE),1)
29 OBJS += producer_sdl_image.o
30 CFLAGS += -DWITH_SDL_IMAGE
31 LDFLAGS += -lSDL_image
32 endif
33
34 SRCS := $(OBJS:.o=.c)
35 ifeq ($(targetos),Darwin)
36 OBJS += consumer_sdl_osx.o
37 SRCS += consumer_sdl_osx.m consumer_sdl_osx.h
38 endif
39
40 ifeq ($(targetos), MinGW)
41 OBJS += ../../win32/win32.o
42 SRCS += ../../win32/win32.c
43 endif
44
45 all:    $(TARGET)
46
47 $(TARGET): $(OBJS)
48                 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
49
50 depend: $(SRCS)
51                 $(CC) -MM $(CFLAGS) $^ 1>.depend
52
53 distclean:      clean
54                 rm -f .depend
55
56 clean:  
57                 rm -f $(OBJS) $(TARGET)
58
59 install: all
60         install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
61
62 ifneq ($(wildcard .depend),)
63 include .depend
64 endif