GTEST_DIR ?= /usr/src/gtest
+# This will be upgraded for each release, although not necessarily for every git commit.
+# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+# for the rules as of how this is changed. This does not really mean that Movit will
+# strive towards having a rock-stable ABI, but at least the soversion will increase
+# whenever it breaks, so that you will not have silent failures, and distribution package
+# management can run its course.
+movit_ltversion = 1:0:0
+movit_version = 1.0
+
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
endif
# Google Test and other test library functions.
-TEST_OBJS = gtest-all.o gtest_sdl_main.o test_util.o
+OWN_TEST_OBJS = gtest_sdl_main.o test_util.o
+TEST_OBJS = gtest-all.o $(OWN_TEST_OBJS)
gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc
$(CXX) -MMD $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c $< -o $@
$(TESTS): %: %.o $(TEST_OBJS) libmovit.la
$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+OWN_OBJS=$(DEMO_OBJS) $(LIB_OBJS) $(OWN_TEST_OBJS) $(TESTS:=.o)
OBJS=$(DEMO_OBJS) $(LIB_OBJS) $(TEST_OBJS) $(TESTS:=.o)
# A small demo program.
# The library itself.
libmovit.la: $(LIB_OBJS:.o=.lo)
- $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -rpath $(libdir) -o $@ $^ $(LDLIBS)
+ $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -rpath $(libdir) -version-info $(movit_ltversion) -o $@ $^ $(LDLIBS)
%.lo: %.cpp
$(LIBTOOL) --mode=compile $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
# These purposefully do not exist.
MISSING_SHADERS = diffusion_effect.frag glow_effect.frag unsharp_mask_effect.frag resize_effect.frag
+MISSING_SHADERS += fft_convolution_effect.frag fft_input.frag
SHADERS := $(filter-out $(MISSING_SHADERS),$(SHADERS))
install: libmovit.la
$(MKDIR) -p $(libdir)/pkgconfig/
$(INSTALL) -m 644 movit.pc $(libdir)/pkgconfig/
-.PHONY: coverage clean distclean check all install
+DISTDIR=movit-$(movit_version)
+OTHER_DIST_FILES=add.frag autogen.sh blue.frag configure.ac d65.h effectlist.txt identity.frag invert_effect.frag Makefile.in mipmap_needing_effect.frag movit.pc.in README NEWS test_util.h widgets.h
+
+dist:
+ $(MKDIR) $(DISTDIR)
+ cp $(OWN_OBJS:.o=.cpp) $(DISTDIR)/
+ cp $(HDRS) $(DISTDIR)/
+ cp $(SHADERS) $(DISTDIR)/
+ cp $(OTHER_DIST_FILES) $(DISTDIR)/
+ ( cd $(DISTDIR) && aclocal && libtoolize --install --copy && autoconf && $(RM) -r autom4te.cache/ )
+ tar zcvvf ../$(DISTDIR).tar.gz $(DISTDIR)
+ $(RM) -r $(DISTDIR)
+
+.PHONY: coverage clean distclean check all install dist