diff --git a/CMakeLists.txt b/CMakeLists.txt index c49c0a3..aefc34c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,8 +106,8 @@ endif () # Libwebm section. add_library(webm STATIC - "${LIBWEBM_SRC_DIR}/hdr_util.cpp" - "${LIBWEBM_SRC_DIR}/hdr_util.hpp" + "${LIBWEBM_SRC_DIR}/common/hdr_util.cc" + "${LIBWEBM_SRC_DIR}/common/hdr_util.h" "${LIBWEBM_SRC_DIR}/mkvmuxer.cpp" "${LIBWEBM_SRC_DIR}/mkvmuxer.hpp" "${LIBWEBM_SRC_DIR}/mkvmuxertypes.hpp" diff --git a/Makefile.unix b/Makefile.unix index 2489abb..502869c 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -3,7 +3,7 @@ CXXFLAGS := -W -Wall -g -MMD -MP LIBWEBMA := libwebm.a LIBWEBMSO := libwebm.so WEBMOBJS := mkvparser.o mkvreader.o mkvmuxer.o mkvmuxerutil.o mkvwriter.o -WEBMOBJS += hdr_util.o +WEBMOBJS += common/hdr_util.o OBJSA := $(WEBMOBJS:.o=_a.o) OBJSSO := $(WEBMOBJS:.o=_so.o) OBJECTS1 := sample.o @@ -12,7 +12,7 @@ OBJECTS3 := dumpvtt.o vttreader.o webvttparser.o OBJECTS4 := vttdemux.o webvttparser.o INCLUDES := -I. DEPS := $(WEBMOBJS:.o=.d) $(OBJECTS1:.o=.d) $(OBJECTS2:.o=.d) -DEPS += $(OBJECTS3:.o=.d) $(OBJECTS4:.o=.d) +DEPS += $(OBJECTS3:.o=.d) $(OBJECTS4:.o=.d) $(OBJSA:.o=.d) $(OBJSSO:.o=.d) EXES := sample_muxer sample dumpvtt vttdemux all: $(EXES) @@ -42,9 +42,13 @@ libwebm.so: $(OBJSSO) %_a.o: %.cpp $(CXX) -c $(CXXFLAGS) $(INCLUDES) $< -o $@ +%_a.o: %.cc + $(CXX) -c $(CXXFLAGS) $(INCLUDES) $< -o $@ %_so.o: %.cpp $(CXX) -c $(CXXFLAGS) -fPIC $(INCLUDES) $< -o $@ +%_so.o: %.cc + $(CXX) -c $(CXXFLAGS) -fPIC $(INCLUDES) $< -o $@ clean: $(RM) -f $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4) $(OBJSA) $(OBJSSO) $(LIBWEBMA) $(LIBWEBMSO) $(EXES) $(DEPS) Makefile.bak diff --git a/hdr_util.cpp b/common/hdr_util.cc similarity index 99% rename from hdr_util.cpp rename to common/hdr_util.cc index 085601a..1752236 100644 --- a/hdr_util.cpp +++ b/common/hdr_util.cc @@ -5,7 +5,7 @@ // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be found in the AUTHORS file in the root of the source tree. -#include "hdr_util.hpp" +#include "hdr_util.h" namespace libwebm { bool CopyPrimaryChromaticity(const mkvparser::PrimaryChromaticity& parser_pc, diff --git a/hdr_util.hpp b/common/hdr_util.h similarity index 89% rename from hdr_util.hpp rename to common/hdr_util.h index c194539..d8b2305 100644 --- a/hdr_util.hpp +++ b/common/hdr_util.h @@ -5,13 +5,13 @@ // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be found in the AUTHORS file in the root of the source tree. -#ifndef LIBWEBM_HDR_UTIL_H_ -#define LIBWEBM_HDR_UTIL_H_ +#ifndef LIBWEBM_COMMON_HDR_UTIL_H_ +#define LIBWEBM_COMMON_HDR_UTIL_H_ #include -#include "mkvmuxer.hpp" -#include "mkvparser.hpp" +#include "../mkvmuxer.hpp" +#include "../mkvparser.hpp" namespace libwebm { @@ -39,4 +39,4 @@ bool CopyColour(const mkvparser::Colour& parser_colour, } // namespace libwebm -#endif // LIBWEBM_HDR_UTIL_H_ +#endif // LIBWEBM_COMMON_HDR_UTIL_H_ diff --git a/sample_muxer.cpp b/sample_muxer.cpp index 70c5c8e..6db2aca 100644 --- a/sample_muxer.cpp +++ b/sample_muxer.cpp @@ -14,7 +14,7 @@ #include // libwebm common includes. -#include "hdr_util.hpp" +#include "common/hdr_util.h" // libwebm parser includes #include "mkvparser.hpp"