diff --git a/src/mn.sh b/src/mn.sh index fab618d9..044b346e 100755 --- a/src/mn.sh +++ b/src/mn.sh @@ -2,9 +2,14 @@ # Create a module that depends on all MakerNote subclasses to # force initialisation of static data in the corresponding # components when using the static library. -cat > mn.cpp < mn.cpp +for file in *mn.hpp; do + echo "#include \""$file"\"" >> mn.cpp +done +echo "namespace {" >> mn.cpp +for file in *mn.hpp; do + class=`grep 'class .*MakerNote.*:' $file | awk '{print $2}'` + echo " Exif::"$class `basename $file .hpp`";" >> mn.cpp +done +echo "}" >> mn.cpp