all: $(TARGETS)
-include $(V4L1_OBJS:.o=.d)
+-include $(V4L1_OBJS:.o=.d)
$(V4L1_LIB): $(V4L1_DEPS)
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_$*)
all: $(TARGETS)
-include $(V4L2_OBJS:.o=.d)
+-include $(V4L2_OBJS:.o=.d)
$(V4L2_LIB): $(V4L2_DEPS)
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_$*)
all: $(TARGETS)
-include $(CONVERT_OBJS:.o=.d)
+-include $(CONVERT_OBJS:.o=.d)
$(CONVERT_LIB): $(CONVERT_OBJS)
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_$*)