summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4lconvert
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-10 13:29:11 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-04-10 13:29:11 +0200
commit8fabb280152af70dddc25fd3c57a346b94326a33 (patch)
treeece926db290a309844a0cf2e4d3f8068cb300d25 /v4l2-apps/libv4l/libv4lconvert
parent4f4f2f81fd16cc9a8b777452b64b3b2ffb4d819c (diff)
downloadmediapointer-dvb-s2-8fabb280152af70dddc25fd3c57a346b94326a33.tar.gz
mediapointer-dvb-s2-8fabb280152af70dddc25fd3c57a346b94326a33.tar.bz2
libv4l: Adds Makefile pre-requisites to libv4l
From: Gilles Gigan <gilles.gigan@gmail.com> This patch update libv4l's Makefiles so they automatically update and include dependency information for each source file. Priority: normal Signed-off-by: Gilles Gigan <gilles.gigan@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/Makefile b/v4l2-apps/libv4l/libv4lconvert/Makefile
index f779011b4..95b9d31d9 100644
--- a/v4l2-apps/libv4l/libv4lconvert/Makefile
+++ b/v4l2-apps/libv4l/libv4lconvert/Makefile
@@ -30,6 +30,8 @@ endif
all: $(TARGETS)
+include $(CONVERT_OBJS:.o=.d)
+
$(CONVERT_LIB): $(CONVERT_OBJS)
libv4lconvert.pc:
@@ -60,8 +62,12 @@ endif
clean::
rm -f *.a *.so* *.o *.d libv4lconvert.pc log *~ *.orig *.rej
+%.d:: %.c
+ @set -e; rm -f $@; \
+ $(CC) -MM $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
+
%.o: %.c
- $(CC) -c -MMD $(CPPFLAGS) $(CFLAGS) -o $@ $<
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
%.so:
$(CC) -shared $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^