shithub: openh264

Download patch

ref: 9b70a6dbafa2e17c04f51b12e3abb3d76493732b
parent: 97a4b708de0464e518787aef2aed29e93e76f29b
parent: a164436d9801ac13f604e788adba9b59b611b56d
author: Ethan Hugg <ethanhugg@gmail.com>
date: Tue Jan 28 06:13:57 EST 2014

Merge pull request #198 from mstorsjo/makefile-deps

Automatically track per-file dependencies

--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,9 @@
 *.o
 *.ko
 
+# Dependency files
+*.d
+
 # Libraries
 *.lib
 *.a
--- a/Makefile
+++ b/Makefile
@@ -99,7 +99,7 @@
 all:	libraries binaries
 
 clean:
-	rm -f $(OBJS) $(LIBRARIES) $(BINARIES)
+	rm -f $(OBJS) $(OBJS:.o=.d) $(LIBRARIES) $(BINARIES)
 
 gtest-bootstrap:
 	svn co https://googletest.googlecode.com/svn/trunk/ gtest
@@ -124,3 +124,5 @@
 include build/gtest-targets.mk
 include test/targets.mk
 endif
+
+-include $(OBJS:.o=.d)
--- a/build/platform-darwin.mk
+++ b/build/platform-darwin.mk
@@ -1,6 +1,6 @@
 
 ASM = nasm
-CFLAGS += -Wno-deprecated-declarations -Werror -fPIC -DMACOS -DMT_ENABLED
+CFLAGS += -Wno-deprecated-declarations -Werror -fPIC -DMACOS -DMT_ENABLED -MMD -MP
 LDFLAGS += -lpthread
 ASMFLAGS += --prefix _ -DNOPREFIX
 ifeq ($(ENABLE64BIT), Yes)
--- a/build/platform-linux.mk
+++ b/build/platform-linux.mk
@@ -1,5 +1,5 @@
 ASM = nasm
-CFLAGS += -Werror -fPIC -DLINUX -DMT_ENABLED
+CFLAGS += -Werror -fPIC -DLINUX -DMT_ENABLED -MMD -MP
 LDFLAGS += -lpthread
 ASMFLAGS += -DNOPREFIX
 ifeq ($(ENABLE64BIT), Yes)
--- a/build/platform-mingw_nt.mk
+++ b/build/platform-mingw_nt.mk
@@ -1,5 +1,5 @@
 ASM = nasm
-CFLAGS += -DMT_ENABLED
+CFLAGS += -DMT_ENABLED -MMD -MP
 LDFLAGS +=
 ifeq ($(ENABLE64BIT), Yes)
 ASMFLAGS += -f win64