]> git.sesse.net Git - mlt/blob - src/framework/Makefile
Make animation length optional.
[mlt] / src / framework / Makefile
1 include ../../config.mak
2 include config.mak
3
4 NAME = libmlt$(LIBSUF)
5 TARGET = $(NAME).$(version)
6
7 ifeq ($(targetos), Darwin)
8 NAME = libmlt$(LIBSUF)
9 TARGET = libmlt.$(version)$(LIBSUF)
10 SONAME = libmlt.$(soversion)$(LIBSUF)
11 SHFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compatibility_version $(soversion)
12 else ifeq ($(targetos), MinGW)
13 NAME = libmlt$(LIBSUF)
14 TARGET = libmlt-$(soversion)$(LIBSUF)
15 SHFLAGS += -Wl,--output-def,libmlt.def
16 else
17 NAME = libmlt$(LIBSUF)
18 TARGET = $(NAME).$(version)
19 SONAME = $(NAME).$(soversion)
20 SHFLAGS += -Wl,-soname,$(SONAME)
21 endif
22
23 ifeq ($(targetos), Linux)
24 SHFLAGS += -Wl,--version-script=mlt.vers
25 endif
26
27 OBJS = mlt_frame.o \
28            mlt_version.o \
29            mlt_geometry.o \
30            mlt_deque.o \
31            mlt_property.o \
32            mlt_properties.o \
33            mlt_events.o \
34            mlt_parser.o \
35            mlt_service.o \
36            mlt_producer.o \
37            mlt_multitrack.o \
38            mlt_playlist.o \
39            mlt_consumer.o \
40            mlt_filter.o \
41            mlt_transition.o \
42            mlt_field.o \
43            mlt_tractor.o \
44            mlt_factory.o \
45            mlt_repository.o \
46            mlt_pool.o \
47            mlt_tokeniser.o \
48            mlt_profile.o \
49            mlt_log.o \
50            mlt_cache.o \
51            mlt_animation.o
52
53 INCS = mlt_consumer.h \
54            mlt_version.h \
55            mlt_factory.h \
56            mlt_filter.h \
57            mlt.h \
58            mlt_multitrack.h \
59            mlt_pool.h \
60            mlt_properties.h \
61            mlt_events.h \
62            mlt_parser.h \
63            mlt_repository.h \
64            mlt_tractor.h \
65            mlt_types.h \
66            mlt_deque.h \
67            mlt_field.h \
68            mlt_frame.h \
69            mlt_geometry.h \
70            mlt_playlist.h \
71            mlt_producer.h \
72            mlt_property.h \
73            mlt_service.h  \
74            mlt_transition.h \
75            mlt_tokeniser.h \
76            mlt_profile.h \
77            mlt_log.h \
78            mlt_cache.h \
79            mlt_animation.h
80
81 SRCS := $(OBJS:.o=.c)
82
83 ifeq ($(targetos), MinGW)
84 OBJS += ../win32/win32.o
85 SRCS += ../win32/win32.c
86 endif
87
88 CFLAGS += $(RDYNAMIC) -DPREFIX_DATA="\"$(mltdatadir)\"" -DPREFIX_LIB="\"$(moduledir)\""
89
90 LDFLAGS += $(LIBDL) -lpthread -lm
91
92 all:    $(TARGET)
93
94 $(TARGET): $(OBJS)
95                 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
96                 ln -sf $(TARGET) $(NAME)
97                 if [ "$(targetos)" != "MinGW" ]; then \
98                         ln -sf $(TARGET) $(SONAME) ; \
99                 fi
100
101 depend: $(SRCS)
102         $(CC) -MM $(CFLAGS) $^ 1>.depend
103
104 distclean:      clean
105                 rm -f .depend
106
107 clean:  
108                 rm -f $(OBJS) $(TARGET) $(NAME) $(SONAME)
109
110 install:
111         install -d $(DESTDIR)$(libdir)
112         if [ "$(targetos)" = "MinGW" ]; then \
113                 install -m 755 $(TARGET) $(DESTDIR)$(prefix) ; \
114                 install -m 755 $(TARGET) $(DESTDIR)$(libdir)/libmlt.dll ; \
115                 install -m 644 libmlt.def $(DESTDIR)$(libdir) ; \
116         else \
117                 install -m 755 $(TARGET) $(DESTDIR)$(libdir) ; \
118                 ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME) ; \
119                 ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) ; \
120         fi
121         install -d "$(DESTDIR)$(prefix)/include/mlt/framework"
122         install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/framework"
123         install -d "$(DESTDIR)$(mltdatadir)"
124         install -m 644 metaschema.yaml "$(DESTDIR)$(mltdatadir)"
125
126 uninstall:
127         rm -f "$(DESTDIR)$(libdir)/$(TARGET)"
128         if [ "$(targetos)" != "MinGW" ]; then \
129                 rm -f "$(DESTDIR)$(libdir)/$(SONAME)" ; \
130                 rm -f "$(DESTDIR)$(libdir)/$(NAME)" ; \
131         fi
132         rm -rf "$(DESTDIR)$(prefix)/include/mlt/framework"
133         rm -f "$(DESTDIR)$(mltdatadir)/metaschema.yaml"
134
135 ifneq ($(wildcard .depend),)
136 include .depend
137 endif