2012-09-21 22:56:11 +02:00
|
|
|
CXX := g++
|
|
|
|
CXXFLAGS := -W -Wall -g
|
|
|
|
LIBWEBMA := libwebm.a
|
|
|
|
LIBWEBMSO := libwebm.so
|
|
|
|
WEBMOBJS := mkvparser.o mkvreader.o mkvmuxer.o mkvmuxerutil.o mkvwriter.o
|
|
|
|
OBJSA := $(WEBMOBJS:.o=_a.o)
|
|
|
|
OBJSSO := $(WEBMOBJS:.o=_so.o)
|
|
|
|
OBJECTS1 := sample.o
|
|
|
|
OBJECTS2 := sample_muxer.o
|
|
|
|
OBJECTS3 := dumpvtt.o vttreader.o webvttparser.o
|
2012-08-15 01:40:33 +02:00
|
|
|
OBJECTS4 := vttreader.o webvttparser.o sample_muxer_metadata.o
|
2012-09-21 22:56:11 +02:00
|
|
|
INCLUDES := -I.
|
|
|
|
EXES := samplemuxer sample dumpvtt
|
2010-06-02 16:25:06 +02:00
|
|
|
|
2011-06-21 20:42:55 +02:00
|
|
|
all: $(EXES)
|
2010-06-02 16:25:06 +02:00
|
|
|
|
2012-09-21 22:56:11 +02:00
|
|
|
sample: sample.o $(LIBWEBMA)
|
2011-06-21 20:42:55 +02:00
|
|
|
$(CXX) $^ -o $@
|
2010-06-02 16:25:06 +02:00
|
|
|
|
2012-08-15 01:40:33 +02:00
|
|
|
samplemuxer: sample_muxer.o $(LIBWEBMA) $(OBJECTS4)
|
2011-06-21 20:42:55 +02:00
|
|
|
$(CXX) $^ -o $@
|
2010-06-02 16:25:06 +02:00
|
|
|
|
2012-08-21 00:41:06 +02:00
|
|
|
dumpvtt: $(OBJECTS3)
|
|
|
|
$(CXX) $^ -o $@
|
|
|
|
|
2012-09-21 22:56:11 +02:00
|
|
|
shared: $(LIBWEBMSO)
|
|
|
|
|
|
|
|
libwebm.a: $(OBJSA)
|
2011-06-21 20:42:55 +02:00
|
|
|
$(AR) rcs $@ $^
|
|
|
|
|
2012-09-21 22:56:11 +02:00
|
|
|
libwebm.so: $(OBJSSO)
|
|
|
|
$(CXX) $(CXXFLAGS) -shared $(OBJSSO) -o $(LIBWEBMSO)
|
|
|
|
|
2011-06-21 20:42:55 +02:00
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) $(INCLUDES) $< -o $@
|
2010-06-02 16:25:06 +02:00
|
|
|
|
2012-09-21 22:56:11 +02:00
|
|
|
%_a.o: %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) $(INCLUDES) $< -o $@
|
|
|
|
|
|
|
|
%_so.o: %.cpp
|
|
|
|
$(CXX) -c $(CXXFLAGS) -fPIC $(INCLUDES) $< -o $@
|
|
|
|
|
2010-06-02 16:25:06 +02:00
|
|
|
clean:
|
2012-08-15 01:40:33 +02:00
|
|
|
$(RM) -f $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4) $(OBJSA) $(OBJSSO) $(LIBWEBMA) $(LIBWEBMSO) $(EXES) Makefile.bak
|