add "checkheaders" target
authorMåns Rullgård <mans@mansr.com>
Sun, 17 Jun 2007 00:05:39 +0000 (00:05 +0000)
committerMåns Rullgård <mans@mansr.com>
Sun, 17 Jun 2007 00:05:39 +0000 (00:05 +0000)
Originally committed as revision 9346 to svn://svn.ffmpeg.org/ffmpeg/trunk

common.mak

index 0274a5a72575da58ad6cb298c1e6fada815423bc..feee94f575a496f7f679be6d623cfabee3adc462 100644 (file)
@@ -42,12 +42,18 @@ $(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
 %: %.o $(LIB)
        $(CC) $(LDFLAGS) -o $@ $^ $(EXTRALIBS)
 
+%.ho: %.h
+       $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
+
+ALLHEADERS = $(subst $(VPATH)/,,$(wildcard $(VPATH)/*.h))
+checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho))
+
 depend dep: $(SRCS)
        $(CC) -MM $(CFLAGS) $^ 1>.depend
 
 clean::
        rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \
-             *.def *.dll.a *.exp
+             *.def *.dll.a *.exp *.ho
 
 distclean: clean
        rm -f .depend