]> git.sesse.net Git - mlt/blob - src/framework/Makefile
0c61cee035bf86d04483a77a2808246b673dace0
[mlt] / src / framework / Makefile
1 include ../../config.mak
2
3 NAME = libmlt$(LIBSUF)
4 TARGET = $(NAME).$(version)
5
6 ifneq ($(targetos), Darwin)
7 NAME = libmlt$(LIBSUF)
8 TARGET = $(NAME).$(version)
9 SONAME = $(NAME).$(soversion)
10 SHFLAGS += -Wl,-soname,$(SONAME)
11 else
12 NAME = libmlt$(LIBSUF)
13 TARGET = libmlt.$(version)$(LIBSUF)
14 SONAME = libmlt.$(soversion)$(LIBSUF)
15 SHFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compatibility_version $(soversion)
16 endif
17
18 OBJS = mlt_frame.o \
19            mlt_version.o \
20            mlt_geometry.o \
21            mlt_deque.o \
22            mlt_property.o \
23            mlt_properties.o \
24            mlt_events.o \
25            mlt_parser.o \
26            mlt_service.o \
27            mlt_producer.o \
28            mlt_multitrack.o \
29            mlt_playlist.o \
30            mlt_consumer.o \
31            mlt_filter.o \
32            mlt_transition.o \
33            mlt_field.o \
34            mlt_tractor.o \
35            mlt_factory.o \
36            mlt_repository.o \
37            mlt_pool.o \
38            mlt_tokeniser.o \
39            mlt_profile.o \
40            mlt_log.o \
41            mlt_cache.o
42
43 INCS = mlt_consumer.h \
44            mlt_version.h \
45            mlt_factory.h \
46            mlt_filter.h \
47            mlt.h \
48            mlt_multitrack.h \
49            mlt_pool.h \
50            mlt_properties.h \
51            mlt_events.h \
52            mlt_parser.h \
53            mlt_repository.h \
54            mlt_tractor.h \
55            mlt_types.h \
56            mlt_deque.h \
57            mlt_field.h \
58            mlt_frame.h \
59            mlt_geometry.h \
60            mlt_playlist.h \
61            mlt_producer.h \
62            mlt_property.h \
63            mlt_service.h  \
64            mlt_transition.h \
65            mlt_tokeniser.h \
66            mlt_profile.h \
67            mlt_log.h \
68            mlt_cache.h
69
70 SRCS := $(OBJS:.o=.c)
71
72 CFLAGS += $(RDYNAMIC) -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\""
73
74 LDFLAGS += $(LIBDL) -lpthread
75
76 all:    $(TARGET)
77
78 $(TARGET): $(OBJS)
79                 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
80                 ln -sf $(TARGET) $(NAME)
81                 ln -sf $(TARGET) $(SONAME)
82
83 depend: $(SRCS)
84         $(CC) -MM $(CFLAGS) $^ 1>.depend
85
86 distclean:      clean
87                 rm -f .depend
88
89 clean:  
90                 rm -f $(OBJS) $(TARGET) $(NAME) $(SONAME)
91
92 install:
93         install -d $(DESTDIR)$(libdir)
94         install -m 755 $(TARGET) $(DESTDIR)$(libdir)
95         ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME)
96         ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME)
97         install -d "$(DESTDIR)$(prefix)/include/mlt/framework"
98         install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/framework"
99         install -d "$(DESTDIR)$(datadir)/mlt"
100         install -m 644 metaschema.yaml "$(DESTDIR)$(datadir)/mlt/"
101
102 uninstall:
103         rm -f "$(DESTDIR)$(libdir)/$(TARGET)"
104         rm -f "$(DESTDIR)$(libdir)/$(SONAME)"
105         rm -f "$(DESTDIR)$(libdir)/$(NAME)"
106         rm -rf "$(DESTDIR)$(prefix)/include/mlt/framework"
107         rm -f "$(DESTDIR)$(datadir)/mlt/metaschema.yaml"
108
109 ifneq ($(wildcard .depend),)
110 include .depend
111 endif