]> git.sesse.net Git - mlt/blob - src/valerie/Makefile
+ Fix for Darwin and soname logic
[mlt] / src / valerie / Makefile
1 include ../../config.mak
2
3 ifneq ($(targetos), Darwin)
4 NAME = libvalerie$(LIBSUF)
5 TARGET = $(NAME).$(version)
6 SHFLAGS += -Wl,-soname,$(TARGET)
7 else
8 NAME = libvalerie$(LIBSUF)
9 TARGET = libvalerie.$(version)$(LIBSUF)
10 SHFLAGS += -install_name $(libdir)/$(TARGET)
11 endif
12
13 OBJS = valerie.o \
14            valerie_notifier.o \
15            valerie_parser.o \
16            valerie_response.o \
17            valerie_status.o \
18            valerie_tokeniser.o \
19            valerie_util.o \
20            valerie_remote.o \
21            valerie_socket.o
22
23 INCS = valerie.h \
24            valerie_notifier.h \
25            valerie_parser.h \
26            valerie_remote.h \
27            valerie_response.h \
28            valerie_socket.h \
29            valerie_status.h \
30            valerie_tokeniser.h \
31            valerie_util.h
32
33 SRCS := $(OBJS:.o=.c)
34
35 CFLAGS += -I.. $(RDYNAMIC)
36 LDFLAGS += -L../framework -lmlt -lpthread
37
38 all: $(TARGET)
39
40 $(TARGET): $(OBJS)
41                 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
42                 ln -sf $(TARGET) $(NAME)
43
44 depend: $(SRCS)
45                 $(CC) -MM $(CFLAGS) $^ 1>.depend
46
47 distclean:      clean
48                 rm -f .depend
49
50 clean:  
51                 rm -f $(OBJS) $(TARGET) $(NAME)
52
53 install:        all
54         install -m 755 $(TARGET) $(DESTDIR)$(libdir)
55         ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME)
56         mkdir -p "$(DESTDIR)$(prefix)/include/mlt/valerie"
57         install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/valerie"
58
59 ifneq ($(wildcard .depend),)
60 include .depend
61 endif