diff options
Diffstat (limited to 'v4l/Makefile')
-rw-r--r-- | v4l/Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/v4l/Makefile b/v4l/Makefile index 58b160397..3ba4603f3 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -25,7 +25,7 @@ endif ################################################# # default compilation rule -default:: Makefile.media links .version +default:: config-compat.h Makefile.media links .version echo srcdir $(SRCDIR) $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules @@ -188,6 +188,22 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -exec ln -sf '{}' . \; @find ../linux/sound -name '*.[ch]' -type f -exec ln -sf '{}' . \; +config-compat.h:: .myconfig + @echo \#ifndef __CONFIG_COMPAT_H__ > config-compat.h + @echo \#define __CONFIG_COMPAT_H__ >> config-compat.h + @echo >> config-compat.h + @echo \#include \<linux\/config\.h\> >> config-compat.h + @echo >> config-compat.h + @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ + sed s/"CONFIG\_"/"\#undef CONFIG\_"/1 | \ + sed s/"\:\= ."/""/1 >> config-compat.h >> config-compat.h + @echo >> config-compat.h + @grep "CONFIG\_" .myconfig | grep -v "\:\= n" | \ + sed s/"CONFIG\_"/"\#define CONFIG\_"/1 | \ + sed s/"\:\="/""/1 >> config-compat.h >> config-compat.h + @echo >> config-compat.h + @echo \#endif >> config-compat.h + kernel-links makelinks:: cd ..; v4l/scripts/makelinks.sh $(KDIR) @@ -204,7 +220,7 @@ clean:: @find . -name '*.c' -type l -exec rm '{}' \; @find . -name '*.h' -type l -exec rm '{}' \; -rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump \ - ivtv-svnversion.h + ivtv-svnversion.h config-compat.h distclean:: clean -rm -f .version .*.o.flags .*.o.d Makefile.media \ |