96 lines
4.2 KiB
Diff
96 lines
4.2 KiB
Diff
diff -up ffms2-5.0/test/Makefile.orig ffms2-5.0/test/Makefile
|
|
--- ffms2-5.0/test/Makefile.orig 2024-05-28 16:52:48.000000000 +0200
|
|
+++ ffms2-5.0/test/Makefile 2024-09-06 23:01:39.310006012 +0200
|
|
@@ -14,7 +14,7 @@ SAMPLES_URL =
|
|
# Flags passed to the preprocessor.
|
|
# Set Google Test's header directory as a system directory, such that
|
|
# the compiler doesn't generate warnings in Google Test headers.
|
|
-CPPFLAGS += -isystem $(GTEST_DIR)/include \
|
|
+CPPFLAGS += \
|
|
-I$(USER_DIR)/include \
|
|
-D_FILE_OFFSET_BITS=64 \
|
|
-DFFMS_EXPORTS \
|
|
@@ -22,7 +22,7 @@ CPPFLAGS += -isystem $(GTEST_DIR)/includ
|
|
-DSAMPLES_DIR=$(SAMPLES_DIR)
|
|
|
|
# Flags passed to the C++ compiler.
|
|
-CXXFLAGS += -g -Wall -Wextra -pthread -std=c++11 -fvisibility=hidden
|
|
+CXXFLAGS += -g -Wall -Wextra -pthread -fvisibility=hidden
|
|
|
|
# All tests produced by this Makefile. Remember to add new tests you
|
|
# created to the list.
|
|
@@ -51,10 +51,6 @@ SAMPLES = test.mp4 \
|
|
qrvideo_24fps_elist_starts_ctts_2ndsample.mov \
|
|
qrvideo_stream_shorter_than_movie.mov
|
|
|
|
-# All Google Test headers. Usually you shouldn't change this
|
|
-# definition.
|
|
-GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h $(GTEST_DIR)/include/gtest/internal/*.h
|
|
-
|
|
# House-keeping build targets.
|
|
|
|
all: $(TESTS)
|
|
@@ -72,54 +68,32 @@ clean:
|
|
rm -f $(TESTS) gtest.a gtest_main.a *.o
|
|
rm -rf .libs
|
|
|
|
-# Builds gtest.a and gtest_main.a.
|
|
-
|
|
-# Usually you shouldn't tweak such internal variables, indicated by a
|
|
-# trailing _.
|
|
-GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS)
|
|
-
|
|
-# For simplicity and to avoid depending on Google Test's
|
|
-# implementation details, the dependencies specified below are
|
|
-# conservative and not optimized. This is fine as Google Test
|
|
-# compiles fast and for ordinary users its source rarely changes.
|
|
-gtest-all.o: $(GTEST_SRCS_)
|
|
- $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest-all.cc
|
|
-
|
|
-gtest_main.o: $(GTEST_SRCS_)
|
|
- $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest_main.cc
|
|
-
|
|
-gtest.a: gtest-all.o
|
|
- $(AR) $(ARFLAGS) $@ $^
|
|
-
|
|
-gtest_main.a: gtest-all.o gtest_main.o
|
|
- $(AR) $(ARFLAGS) $@ $^
|
|
-
|
|
-tests.o: $(USER_DIR)/test/tests.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
|
|
+tests.o: $(USER_DIR)/test/tests.cpp $(USER_DIR)/include/ffms.h
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/tests.cpp
|
|
|
|
-hdr.o: $(USER_DIR)/test/hdr.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
|
|
+hdr.o: $(USER_DIR)/test/hdr.cpp $(USER_DIR)/include/ffms.h
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/hdr.cpp
|
|
|
|
-display_matrix.o: $(USER_DIR)/test/display_matrix.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
|
|
+display_matrix.o: $(USER_DIR)/test/display_matrix.cpp $(USER_DIR)/include/ffms.h
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/display_matrix.cpp
|
|
|
|
-indexer.o: $(USER_DIR)/test/indexer.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
|
|
+indexer.o: $(USER_DIR)/test/indexer.cpp $(USER_DIR)/include/ffms.h
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/indexer.cpp
|
|
|
|
-indexer: indexer.o tests.o gtest_main.a ../src/core/libffms2.la
|
|
- ../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o indexer indexer.o tests.o gtest_main.a -lavutil ../src/core/libffms2.la
|
|
+indexer: indexer.o tests.o ../src/core/libffms2.la
|
|
+ ../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o indexer indexer.o tests.o -lgtest -lgtest_main -lavutil ../src/core/libffms2.la
|
|
|
|
indexer-run:
|
|
@./indexer
|
|
|
|
hdr: hdr.o gtest_main.a ../src/core/libffms2.la
|
|
- ../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o hdr hdr.o gtest_main.a -lavutil ../src/core/libffms2.la
|
|
+ ../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o hdr hdr.o -lgtest -lgtest_main -lavutil ../src/core/libffms2.la
|
|
|
|
hdr-run:
|
|
@./hdr
|
|
|
|
-display_matrix: display_matrix.o gtest_main.a ../src/core/libffms2.la
|
|
- ../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o display_matrix display_matrix.o gtest_main.a -lavutil ../src/core/libffms2.la
|
|
+display_matrix: display_matrix.o ../src/core/libffms2.la
|
|
+ ../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o display_matrix display_matrix.o -lgtest -lgtest_main -lavutil ../src/core/libffms2.la
|
|
|
|
display_matrix-run:
|
|
@./display_matrix
|