Add dependency checks to Makefile.
Avoid unfortunate things like breaking the library because the make file was not previously checking dependencies. Change-Id: Iab20c3cfa0d1475dfb5c54127646b351df1c4c50
This commit is contained in:
parent
f72dc7b052
commit
25025a5471
10
Makefile
10
Makefile
@ -1,5 +1,5 @@
|
|||||||
CXX := g++
|
CXX := g++
|
||||||
CXXFLAGS := -W -Wall -g
|
CXXFLAGS := -W -Wall -g -MMD -MP
|
||||||
LIBWEBMA := libwebm.a
|
LIBWEBMA := libwebm.a
|
||||||
LIBWEBMSO := libwebm.so
|
LIBWEBMSO := libwebm.so
|
||||||
WEBMOBJS := mkvparser.o mkvreader.o mkvmuxer.o mkvmuxerutil.o mkvwriter.o
|
WEBMOBJS := mkvparser.o mkvreader.o mkvmuxer.o mkvmuxerutil.o mkvwriter.o
|
||||||
@ -10,6 +10,8 @@ OBJECTS2 := sample_muxer.o vttreader.o webvttparser.o sample_muxer_metadata.o
|
|||||||
OBJECTS3 := dumpvtt.o vttreader.o webvttparser.o
|
OBJECTS3 := dumpvtt.o vttreader.o webvttparser.o
|
||||||
OBJECTS4 := vttdemux.o webvttparser.o
|
OBJECTS4 := vttdemux.o webvttparser.o
|
||||||
INCLUDES := -I.
|
INCLUDES := -I.
|
||||||
|
DEPS := $(WEBMOBJS:.o=.d) $(OBJECTS1:.o=.d) $(OBJECTS2:.o=.d)
|
||||||
|
DEPS += $(OBJECTS3:.o=.d) $(OBJECTS4:.o=.d)
|
||||||
EXES := samplemuxer sample dumpvtt vttdemux
|
EXES := samplemuxer sample dumpvtt vttdemux
|
||||||
|
|
||||||
all: $(EXES)
|
all: $(EXES)
|
||||||
@ -44,4 +46,8 @@ libwebm.so: $(OBJSSO)
|
|||||||
$(CXX) -c $(CXXFLAGS) -fPIC $(INCLUDES) $< -o $@
|
$(CXX) -c $(CXXFLAGS) -fPIC $(INCLUDES) $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4) $(OBJSA) $(OBJSSO) $(LIBWEBMA) $(LIBWEBMSO) $(EXES) Makefile.bak
|
$(RM) -f $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4) $(OBJSA) $(OBJSSO) $(LIBWEBMA) $(LIBWEBMSO) $(EXES) $(DEPS) Makefile.bak
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS), clean)
|
||||||
|
-include $(DEPS)
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user