]> git.sesse.net Git - mlt/blob - src/miracle/Makefile
8cba00af71cc568bffc42a9c037833ccc4280a18
[mlt] / src / miracle / Makefile
1 include ../../config.mak
2
3 TARGET = miracle
4
5 APP_OBJS = miracle.o
6
7 LIB_OBJS = miracle_log.o \
8            miracle_server.o \
9            miracle_connection.o \
10            miracle_local.o \
11            miracle_unit.o \
12            miracle_commands.o \
13            miracle_unit_commands.o
14
15 OBJS = $(APP_OBJS) $(LIB_OBJS)
16
17 CFLAGS = -O4 -pipe -ffast-math -fomit-frame-pointer -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic
18
19 LDFLAGS = -L ../valerie -lvalerie -L ../framework -lmlt
20
21 ifeq ($(MLT_GPROF),true)
22 CFLAGS+=-p
23 LDFLAGS+=-p
24 endif
25
26 SRCS := $(OBJS:.o=.c)
27
28 all:            $(TARGET)
29
30 $(TARGET):      $(APP_OBJS) libmiracle.so
31                         $(CC) -o $@ $(APP_OBJS) -L. -lmiracle $(LDFLAGS)
32
33 libmiracle.so:  $(LIB_OBJS)
34                         $(CC) -shared -o $@ $(LIB_OBJS) $(LDFLAGS)
35
36 depend:         $(SRCS)
37                         $(CC) -MM $(CFLAGS) $^ 1>.depend
38
39 dist-clean:     clean
40                         rm -f .depend
41
42 clean:  
43                         rm -f $(OBJS) $(TARGET) libmiracle.so
44
45 install:        all
46         install -d "$(bindir)"
47         install -c -s -m 755 $(TARGET) "$(bindir)"
48         install -m 755 libmiracle.so $(prefix)/lib/libmiracle.so
49         mkdir -p "$(prefix)/include/mlt/miracle"
50         install -m 644 \
51                         miracle_local.h \
52             "$(prefix)/include/mlt/miracle"
53
54 ifneq ($(wildcard .depend),)
55 include .depend
56 endif