Constness changes
[melted] / 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_geometry.o \
20 mlt_deque.o \
21 mlt_property.o \
22 mlt_properties.o \
23 mlt_events.o \
24 mlt_parser.o \
25 mlt_service.o \
26 mlt_producer.o \
27 mlt_multitrack.o \
28 mlt_playlist.o \
29 mlt_consumer.o \
30 mlt_filter.o \
31 mlt_transition.o \
32 mlt_field.o \
33 mlt_tractor.o \
34 mlt_factory.o \
35 mlt_repository.o \
36 mlt_pool.o \
37 mlt_tokeniser.o \
38 mlt_profile.o \
39 mlt_log.o \
40 mlt_cache.o
41
42 INCS = mlt_consumer.h \
43 mlt_factory.h \
44 mlt_filter.h \
45 mlt.h \
46 mlt_multitrack.h \
47 mlt_pool.h \
48 mlt_properties.h \
49 mlt_events.h \
50 mlt_parser.h \
51 mlt_repository.h \
52 mlt_tractor.h \
53 mlt_types.h \
54 mlt_deque.h \
55 mlt_field.h \
56 mlt_frame.h \
57 mlt_geometry.h \
58 mlt_playlist.h \
59 mlt_producer.h \
60 mlt_property.h \
61 mlt_service.h \
62 mlt_transition.h \
63 mlt_tokeniser.h \
64 mlt_profile.h \
65 mlt_log.h \
66 mlt_cache.h
67
68 SRCS := $(OBJS:.o=.c)
69
70 CFLAGS += $(RDYNAMIC) -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\""
71
72 LDFLAGS += -lm $(LIBDL) -lpthread
73
74 all: $(TARGET)
75
76 $(TARGET): $(OBJS)
77 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
78 ln -sf $(TARGET) $(NAME)
79 ln -sf $(TARGET) $(SONAME)
80
81 depend: $(SRCS)
82 $(CC) -MM $(CFLAGS) $^ 1>.depend
83
84 distclean: clean
85 rm -f .depend
86
87 clean:
88 rm -f $(OBJS) $(TARGET) $(NAME)
89
90 install:
91 install -d $(DESTDIR)$(libdir)
92 install -m 755 $(TARGET) $(DESTDIR)$(libdir)
93 ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME)
94 ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME)
95 install -d "$(DESTDIR)$(prefix)/include/mlt/framework"
96 install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/framework"
97 install -d "$(DESTDIR)$(prefix)/share/mlt"
98 install -m 644 metaschema.yaml "$(DESTDIR)$(prefix)/share/mlt/"
99
100 uninstall:
101 rm -f "$(DESTDIR)$(libdir)/$(TARGET)"
102 rm -f "$(DESTDIR)$(libdir)/$(SONAME)"
103 rm -f "$(DESTDIR)$(libdir)/$(NAME)"
104 rm -rf "$(DESTDIR)$(prefix)/include/mlt/framework"
105 rm "$(DESTDIR)$(prefix)/share/mlt/metaschema.yaml"
106
107 ifneq ($(wildcard .depend),)
108 include .depend
109 endif