make install part 1
[melted] / src / valerie / Makefile
index 6fa6d0a..d7ff25c 100644 (file)
@@ -1,3 +1,4 @@
+include ../../config.mak
 
 TARGET = libvalerie.so
 
@@ -17,6 +18,11 @@ CFLAGS=-O3 -Wall -g -D_FILE_OFFSET_BITS=64 -pthread
 
 LDFLAGS=-ldv -lpthread
 
+ifeq ($(MLT_GPROF),true)
+CFLAGS+=-p
+LDFLAGS+=-p
+endif
+
 all: $(TARGET)
 
 $(TARGET): $(OBJS)
@@ -31,6 +37,21 @@ dist-clean:  clean
 clean: 
                rm -f $(OBJS) $(TARGET)
 
+install:       all
+       install -m 755 $(TARGET) $(prefix)/lib/libvalerie.so
+       mkdir -p "$(prefix)/include/mlt/valerie"
+       install -m 644 \
+                       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 \
+            "$(prefix)/include/mlt/valerie"
+
 ifneq ($(wildcard .depend),)
 include .depend
 endif