+include ../../config.mak
-AR = ar
+TARGET = libvalerie$(LIBSUF)
OBJS = valerie.o \
valerie_notifier.o \
valerie_remote.o \
valerie_socket.o
-SRCS := $(OBJS:.o=.c)
+INCS = valerie.h \
+ valerie_notifier.h \
+ valerie_parser.h \
+ valerie_remote.h \
+ valerie_response.h \
+ valerie_socket.h \
+ valerie_status.h \
+ valerie_tokeniser.h \
+ valerie_util.h
-CFLAGS=-Wall -g -D_FILE_OFFSET_BITS=64 -pthread
+SRCS := $(OBJS:.o=.c)
-LDFLAGS=-ldv -lpthread
+CFLAGS += -I.. $(RDYNAMIC)
+LDFLAGS += -L../framework -lmlt -lpthread
-all: libvalerie.a
+all: $(TARGET)
-libvalerie.a: $(OBJS)
- $(AR) rvu $@ $(OBJS)
- ranlib $@
+$(TARGET): $(OBJS)
+ $(CC) $(SHFLAGS) -o $@ $(OBJS) $(LDFLAGS)
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
rm -f .depend
clean:
- rm -f $(OBJS) libvalerie.a
+ rm -f $(OBJS) $(TARGET)
+
+install: all
+ install -m 755 $(TARGET) $(prefix)/lib/libvalerie$(LIBSUF)
+ mkdir -p "$(prefix)/include/mlt/valerie"
+ install -m 644 $(INCS) "$(prefix)/include/mlt/valerie"
ifneq ($(wildcard .depend),)
include .depend