webm/Makefile.unix
Tom Finegan 353b050071 Add hdr_util.
Move the Colour element utility functions out of sample_muxer and
into a place where they can be utilized by libwebm users.

Change-Id: I7e2bfd02d6f4aa4f26fb0d0a697cb68e20698655
2016-02-18 13:13:54 -08:00

55 lines
1.3 KiB
Makefile

CXX := g++
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
OBJSA := $(WEBMOBJS:.o=_a.o)
OBJSSO := $(WEBMOBJS:.o=_so.o)
OBJECTS1 := sample.o
OBJECTS2 := sample_muxer.o vttreader.o webvttparser.o sample_muxer_metadata.o
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)
EXES := sample_muxer sample dumpvtt vttdemux
all: $(EXES)
sample: sample.o $(LIBWEBMA)
$(CXX) $^ -o $@
sample_muxer: $(OBJECTS2) $(LIBWEBMA)
$(CXX) $^ -o $@
dumpvtt: $(OBJECTS3)
$(CXX) $^ -o $@
shared: $(LIBWEBMSO)
vttdemux: $(OBJECTS4) $(LIBWEBMA)
$(CXX) $^ -o $@
libwebm.a: $(OBJSA)
$(AR) rcs $@ $^
libwebm.so: $(OBJSSO)
$(CXX) $(CXXFLAGS) -shared $(OBJSSO) -o $(LIBWEBMSO)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(INCLUDES) $< -o $@
%_a.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(INCLUDES) $< -o $@
%_so.o: %.cpp
$(CXX) -c $(CXXFLAGS) -fPIC $(INCLUDES) $< -o $@
clean:
$(RM) -f $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4) $(OBJSA) $(OBJSSO) $(LIBWEBMA) $(LIBWEBMSO) $(EXES) $(DEPS) Makefile.bak
ifneq ($(MAKECMDGOALS), clean)
-include $(DEPS)
endif