adopt to winsock
[melted] / src / mvcp / Makefile
1 include ../../config.mak
2
3 ifneq ($(targetos), Darwin)
4 NAME = libmvcp$(LIBSUF)
5 TARGET = $(NAME).$(version)
6 SONAME = $(NAME).$(soversion)
7 SHFLAGS += -Wl,-soname,$(SONAME)
8 else
9 NAME = libmvcp$(LIBSUF)
10 TARGET = libmvcp.$(version)$(LIBSUF)
11 SONAME = libmvcp.$(soversion)$(LIBSUF)
12 SHFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compatibility_version $(soversion)
13 endif
14
15 OBJS = mvcp.o \
16 mvcp_notifier.o \
17 mvcp_parser.o \
18 mvcp_response.o \
19 mvcp_status.o \
20 mvcp_tokeniser.o \
21 mvcp_util.o \
22 mvcp_remote.o \
23 mvcp_socket.o
24
25 INCS = mvcp.h \
26 mvcp_notifier.h \
27 mvcp_parser.h \
28 mvcp_remote.h \
29 mvcp_response.h \
30 mvcp_socket.h \
31 mvcp_status.h \
32 mvcp_tokeniser.h \
33 mvcp_util.h
34
35 SRCS := $(OBJS:.o=.c)
36
37 CFLAGS += -I.. $(RDYNAMIC)
38
39 LDFLAGS += -L../framework -lmlt -lpthread
40
41 all: $(TARGET)
42
43 $(TARGET): $(OBJS)
44 $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
45 ln -sf $(TARGET) $(NAME)
46 ln -sf $(TARGET) $(SONAME)
47
48 depend: $(SRCS)
49 $(CC) -MM $(CFLAGS) $^ 1>.depend
50
51 distclean: clean
52 rm -f .depend
53
54 clean:
55 rm -f $(OBJS) $(TARGET) $(NAME) $(SONAME)
56
57 install: all
58 install -m 755 $(TARGET) $(DESTDIR)$(libdir)
59 ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME)
60 ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME)
61 mkdir -p "$(DESTDIR)$(prefix)/include/mlt/mvcp"
62 install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/mvcp"
63
64 uninstall:
65 rm -f "$(DESTDIR)$(libdir)/$(TARGET)"
66 rm -f "$(DESTDIR)$(libdir)/$(SONAME)"
67 rm -f "$(DESTDIR)$(libdir)/$(NAME)"
68 rm -rf "$(DESTDIR)$(prefix)/include/mlt/mvcp"
69
70 ifneq ($(wildcard .depend),)
71 include .depend
72 endif