|
Rockbox mail archiveSubject: Re: plugins as multiple source filesRe: plugins as multiple source files
From: Mike Holden <rockbox_at_mikeholden.uklinux.net>
Date: Tue, 18 May 2004 15:36:53 +0100 (BST) Daniel Stenberg said: > Hi > > The current limitation that plugins must be a single source file is not > a really technical limitation, it is only the way the current build > system works. Since we are now seeing several plugins that share code, > we should try to solve this by allowing a single plugin get linked > together from several object/source files. > > Anyone with a suggestion on how that would be best laid out in the file > system? Perhaps a single dir for each plugin (and each plugin dir would > have a Makefile that could specify additional object files to use), and > then a special dir with "plugin-libs" for generic code for multiple > plugins to use? Another option would be a single archive file (library) that contained one or more global code object files. All the plugins would then pull in that single archive library, with no need for plugin-specific Makefiles. Something like (somewhat stylised commands!) gcc pluginlib1.c ar -r pluginlib.so pluginlib1.o gcc pluginlib2.c ar -r pluginlib.so pluginlib2.o gcc myplugin.c ld myplugin.o pluginlib.so -o myplugin.rock The library pluginlib.so contains exported functions from pluginlib1 and pluginlib2. Myplugin.c pulls in any code it needs from pluginlib, but only pulls in what it needs, which will be zero in most cases at the moment. This would require no new directories in the build area, minimal Makefile changes, and each plugin would need no custom makefile options, so all plugins would use the same makefile. -- Mike Holden Rockbox page: http://www.mikeholden.org/~rockbox _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockboxReceived on 2004-05-18 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |