]> git.sesse.net Git - movit/blobdiff - Makefile.in
More tweaks to the .ld generation.
[movit] / Makefile.in
index 63a69e7083c15bb9690e5523e066345e9160753d..93318cfd608bcd026965f814d45a34c296b27a47 100644 (file)
@@ -8,6 +8,7 @@ datarootdir = @datarootdir@
 datadir = @datadir@
 top_builddir = @top_builddir@
 with_demo_app = @with_demo_app@
+with_coverage = @with_coverage@
 
 CC=@CC@
 CXX=@CXX@
@@ -15,12 +16,12 @@ CXXFLAGS=-Wall @CXXFLAGS@ -I$(GTEST_DIR)/include @Eigen3_CFLAGS@ @GLEW_CFLAGS@
 LDFLAGS=@GLEW_LIBS@ @SDL_LIBS@ -lpthread
 DEMO_LDLIBS=@SDL_image_LIBS@ -lrt -lpthread @libpng_LIBS@
 SHELL=@SHELL@
-LIBTOOL=@LIBTOOL@
+LIBTOOL=@LIBTOOL@ --tag=CXX
 RANLIB=ranlib
 INSTALL=install
 MKDIR=mkdir
 
-ifeq ($(COVERAGE),1)
+ifeq ($(with_coverage),yes)
 CXXFLAGS += -fprofile-arcs -ftest-coverage --coverage
 LDFLAGS += -fprofile-arcs -ftest-coverage
 LDLIBS += -lgcov
@@ -55,6 +56,9 @@ TESTED_EFFECTS += dither_effect
 TESTED_EFFECTS += deconvolution_sharpen_effect
 TESTED_EFFECTS += fft_pass_effect
 TESTED_EFFECTS += vignette_effect
+TESTED_EFFECTS += slice_effect
+TESTED_EFFECTS += complex_modulate_effect
+TESTED_EFFECTS += luma_mix_effect
 
 UNTESTED_EFFECTS = sandbox_effect
 UNTESTED_EFFECTS += mirror_effect
@@ -64,9 +68,9 @@ UNTESTED_EFFECTS += multiply_effect
 EFFECTS = $(TESTED_EFFECTS) $(UNTESTED_EFFECTS)
 
 # Unit tests.
-TESTS=effect_chain_test $(TESTED_INPUTS:=_test) $(TESTED_EFFECTS:=_test)
+TESTS=effect_chain_test fp16_test $(TESTED_INPUTS:=_test) $(TESTED_EFFECTS:=_test)
 
-LIB_OBJS=effect_util.o util.o widgets.o effect.o effect_chain.o init.o resource_pool.o $(INPUTS:=.o) $(EFFECTS:=.o)
+LIB_OBJS=effect_util.o util.o widgets.o effect.o effect_chain.o init.o resource_pool.o fp16.o $(INPUTS:=.o) $(EFFECTS:=.o)
 
 # Default target:
 all: libmovit.la $(TESTS)
@@ -99,10 +103,12 @@ libmovit.la: $(LIB_OBJS:.o=.lo)
 
 %.lo: %.cpp
        $(LIBTOOL) --mode=compile $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
+       [ ! -r $(@:.lo=.d) ] || sed 's/\.o:/\.lo:/' < $(@:.lo=.d) > $(@:.lo=.ld)
+       [ ! -r .libs/$(@:.lo=.d) ] || sed 's/\.o:/\.lo:/' < .libs/$(@:.lo=.d) > .libs/$(@:.lo=.ld)
 %.o: %.cpp
        $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
 
-DEPS=$(OBJS:.o=.d)
+DEPS=$(OBJS:.o=.d) $(OBJS:.o=.ld)
 -include $(DEPS)
 
 clean:
@@ -123,11 +129,16 @@ check: $(TESTS)
                exit 1; \
        fi
 
-# You need to build with COVERAGE=1 to use this target.
+ifeq ($(with_coverage),yes)
 coverage: check
        lcov -d . -c -o movit.info
-       lcov --remove movit.info '*_test.cpp' 'test_util.*' widgets.cpp -o movit.info
+       lcov --remove movit.info '*_test.cpp' 'test_util.*' 'sandbox_effect.*' widgets.cpp -o movit.info
        genhtml -o coverage movit.info
+else
+coverage:
+       @echo You need to compile with --enable-coverage to use this target.
+       @exit 1
+endif
 
 HDRS = effect_chain.h effect_util.h effect.h input.h image_format.h init.h util.h defs.h resource_pool.h
 HDRS += $(INPUTS:=.h)