| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
It turns ot that when building IOKit drivers, something (I'm assuming
some pre-build script - but it does not show up as a build phase)
auto-generates a source file such as <yourkextname>_info.c in the
DerivedSources folder. This file contains something like: KMOD_EXPLICIT_DECL(<your module name from project settings>, <your module version from project settings>, _start, _stop) So, the question is - will declaring these variables in a project source not cause a conflict? The only way that I could think of doing this automatically (using a single header with a version constant/define) was: a. Use an xcconfig file (which I would do in any case in my project). b. Specify an include directive in the xcconfig file like (that's because I could get xcconfig files to use #include but couldn't get them to be properly preprocessed) #include "common/prodver.xcconfig" c. Run a pre-build script that generates this prodver.xcconfig from a template .c file and the common .h that contains the version number. This can be done by running gcc in preprocess only mode. The template file (I call it xcconfig.c) would have just one line: MODULE_VERSION=MYVERSION_NUMBER The script that genreates the xcconfig would be: gcc -include ./common/prodver.h -E -x c -P ./common/xcconfig.c >./common/prodver.xcconfig I'm not sure this is the best way to do it though! There has to be something simpler! Thanks. Devendra. websrvr wrote: Yes but you can use variables in the project files so they should always match. |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-drivers mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-drivers/email@hidden This email sent to email@hidden
| References: | |
| >MODULE_VERSION and MODULE_NAME (From: AI Developer <email@hidden>) | |
| >Re: MODULE_VERSION and MODULE_NAME (From: websrvr <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.