Experimental Physics and
| |||||||||||||||||
|
Dayle Kotturi wrote:
# 5/30/7: option 1. this doesn't work. None of these flags get used because # <product>_CFLAGS_* is not interpreted pad-gen_CFLAGS_RTEMS += -DPAD_GEN pad-ref_CFLAGS_RTEMS += -DPAD_REF pad-lsr_CFLAGS_RTEMS += -DPAD_LSR pad-l1xkly_CFLAGS_RTEMS += -DPAD_L1XKLY pad-kly_CFLAGS_RTEMS += -DPAD_KLY pad-bph_CFLAGS_RTEMS += -DPAD_BPH This doesn't work because the <name>_CFLAGS_<osclass> variables match the <name> part with the basename of the C source file being compiled, not the final product that you're building. Unfortunately the AppDevGuide is not very clear on this point. You are wanting to compile the same set of files several times on the same architecture with different CFLAGS settings, but the EPICS build system is not designed to be able to compile a file more than once on a single target architecture - it can't keep track of what the CFLAGS settings were for the drvPad.o file, all it knows is how to convert drvPad.c into drvPad.o, and once it's done that it can use the result to create any final products that need drvPad.o. Therefor what you're trying to do won't work with the EPICS build system the way you're trying to do it, but you can still do what you need in a slightly different way: you need to create a series of .c files for your different products, but all they contain is a #include of the main .c source file that you're wanting to compile. These files could even contain an appropriate #define PAD_GEN first to save you having to do the CFLAGS thing in the Makefile any more. HTH, - Andrew -- The right to be heard does not automatically include the right to be taken seriously. -- Hubert H. Humphrey
| ||||||||||||||||
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |