C extensions with non-uniform compiler options
I need to build a C extension consisting of several C code files, one of which needs to be compiled with different compiler options. There doesn't seem to be a standard way to do this. As a workaround I added a dummy extension that uses that file, and specified the necessary compiler options for that extension. Then I removed the source file from the file list of the real extension and replaced it by an entry in extra_objects. The idea is the re-use the version compiled for the dummy extension module. However, there are two problems: 1) The documentation for extra_objects states that "These files must not have extensions, as the default extension for the compiler is used." That would be nice, but isn't true: on my Mac, the required ".o" is not added. 2) The object file I wish to add has been created in "build/ temp.macosx-10.3-fat-2.5", but this directory is machine-specific. I need to construct this path in a portable way - but how? Did anyone already solve these problems, or find another solution? Thanks in advance, Konrad.
participants (1)
-
Konrad Hinsen