-AR = ar
+TARGET = libvalerie.so
OBJS = valerie.o \
valerie_notifier.o \
SRCS := $(OBJS:.o=.c)
-CFLAGS=-Wall -g -D_FILE_OFFSET_BITS=64 -pthread
+CFLAGS=-O3 -Wall -g -D_FILE_OFFSET_BITS=64 -pthread
LDFLAGS=-ldv -lpthread
-all: libvalerie.a
+ifeq ($(MLT_GPROF),true)
+CFLAGS+=-p
+LDFLAGS+=-p
+endif
+
+all: $(TARGET)
-libvalerie.a: $(OBJS)
- $(AR) rvu $@ $(OBJS)
- ranlib $@
+$(TARGET): $(OBJS)
+ $(CC) -shared -o $@ $(OBJS) $(LDFLAGS)
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
rm -f .depend
clean:
- rm -f $(OBJS) libvalerie.a
+ rm -f $(OBJS) $(TARGET)
ifneq ($(wildcard .depend),)
include .depend