Browse code

Generate the list of files to clean in subdirectories in common.mak. This way, it can be used from all directories.

Originally committed as revision 12800 to svn://svn.ffmpeg.org/ffmpeg/trunk

Diego Biurrun authored on 2008/04/13 19:09:47
Showing 2 changed files
... ...
@@ -76,7 +76,8 @@ $(SUBDIR)%-test$(EXESUF): $(SUBDIR)%.c $(LIBNAME)
76 76
 	$(CC) $(CFLAGS) $(FFLDFLAGS) -DTEST -o $$@ $$^ $(FFEXTRALIBS)
77 77
 
78 78
 clean::
79
-	rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES))
79
+	rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
80
+	    $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
80 81
 
81 82
 distclean:: clean
82 83
 	rm -f $(DEPS)
... ...
@@ -467,11 +467,9 @@ ASM_OBJS-$(ARCH_BFIN)                  += bfin/pixels_bfin.o \
467 467
 TESTS = $(addsuffix -test$(EXESUF), cabac dct eval fft h264 imgresample rangecoder snow)
468 468
 TESTS-$(ARCH_X86) += cpuid-test$(EXESUF) motion-test$(EXESUF)
469 469
 
470
+CLEANFILES = apiexample$(EXESUF)
470 471
 DIRS = alpha armv4l bfin i386 mlib ppc ps2 sh4 sparc
471 472
 
472
-CLEANFILES = $(addsuffix /*.o,$(DIRS)) $(addsuffix /*.ho,$(DIRS)) \
473
-    $(addsuffix /*~,$(DIRS)) apiexample$(EXESUF)
474
-
475 473
 include $(SUBDIR)../subdir.mak
476 474
 
477 475
 $(SUBDIR)cpuid-test$(EXESUF): $(SUBDIR)i386/cputest.c