summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-16 10:52:39 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-16 10:52:39 +0200
commit9fdc384d90d5bfd705bd5d619d2a7fbdd93aeaf0 (patch)
tree6fea4af1edae355d553d81d3e276fc2bc85b579b /v4l2-apps/libv4l
parent419bda948df875f0c02e25d005d8d20b58fc0931 (diff)
downloadmediapointer-dvb-s2-9fdc384d90d5bfd705bd5d619d2a7fbdd93aeaf0.tar.gz
mediapointer-dvb-s2-9fdc384d90d5bfd705bd5d619d2a7fbdd93aeaf0.tar.bz2
libv4l: Makefiles: better dependency generation
From: Gregor Jasny <gjasny@googlemail.com> libv4l: Makefiles: better dependency generation Priority: normal Signed-off-by: Gregor Jasny <gjasny@googlemail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l')
-rw-r--r--v4l2-apps/libv4l/libv4l1/Makefile8
-rw-r--r--v4l2-apps/libv4l/libv4l2/Makefile8
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/Makefile8
3 files changed, 6 insertions, 18 deletions
diff --git a/v4l2-apps/libv4l/libv4l1/Makefile b/v4l2-apps/libv4l/libv4l1/Makefile
index d228cc916..bd6687e1a 100644
--- a/v4l2-apps/libv4l/libv4l1/Makefile
+++ b/v4l2-apps/libv4l/libv4l1/Makefile
@@ -35,7 +35,7 @@ endif
all: $(TARGETS)
-include $(V4L1_OBJS:.o=.d)
+-include $(V4L1_OBJS:.o=.d)
$(V4L1_LIB): $(V4L1_DEPS)
@@ -73,12 +73,8 @@ endif
clean::
rm -f *.a *.so* *.o *.d libv4l1.pc log *~ *.orig *.rej
-%.d: %.c
- @set -e; rm -f $@; \
- gcc -MM $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
-
%.o: %.c
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+ $(CC) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
%.so:
$(CC) -shared $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^ $(LIBS_$*)
diff --git a/v4l2-apps/libv4l/libv4l2/Makefile b/v4l2-apps/libv4l/libv4l2/Makefile
index 463e4e833..6a2271572 100644
--- a/v4l2-apps/libv4l/libv4l2/Makefile
+++ b/v4l2-apps/libv4l/libv4l2/Makefile
@@ -35,7 +35,7 @@ endif
all: $(TARGETS)
-include $(V4L2_OBJS:.o=.d)
+-include $(V4L2_OBJS:.o=.d)
$(V4L2_LIB): $(V4L2_DEPS)
@@ -73,12 +73,8 @@ endif
clean::
rm -f *.a *.so* *.o *.d libv4l2.pc log *~ *.orig *.rej
-%.d: %.c
- @set -e; rm -f $@; \
- gcc -MM $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
-
%.o: %.c
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+ $(CC) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
%.so:
$(CC) -shared $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^ $(LIBS_$*)
diff --git a/v4l2-apps/libv4l/libv4lconvert/Makefile b/v4l2-apps/libv4l/libv4lconvert/Makefile
index 0e1d5e84e..1ffabcbb9 100644
--- a/v4l2-apps/libv4l/libv4lconvert/Makefile
+++ b/v4l2-apps/libv4l/libv4lconvert/Makefile
@@ -34,7 +34,7 @@ endif
all: $(TARGETS)
-include $(CONVERT_OBJS:.o=.d)
+-include $(CONVERT_OBJS:.o=.d)
$(CONVERT_LIB): $(CONVERT_OBJS)
@@ -67,12 +67,8 @@ clean::
rm -f *.a *.so* *.o *.d */*.o */*.d libv4lconvert.pc log *~ */*~
rm -f *.orig *.rej */*.orig */*.rej
-%.d:: %.c
- @set -e; rm -f $@; \
- $(CC) -MM $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
-
%.o: %.c
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+ $(CC) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
%.so:
$(CC) -shared $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^ $(LIBS_$*)