[PD-dev] makefile template

IOhannes m zmoelnig zmoelnig at iem.at
Tue Oct 18 08:31:57 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2011-10-18 05:01, Patrice Colet wrote:
>
>>> then you did something weird :-)
>>> i had the same problem after changing CC to CXX and replacing
>>> myobject.c
>>> with myobject.cpp
>>>
>>> the template/Makefile is full of assumptions that the sources end
>>> with
>>> ".c"; to compile .cpp files, you will have to replace all the
>>> pattern
>>> substitutions throughout the makefile from %.c to %.cpp
>>> mainly you will find this in constructs like "$(SOURCES:.c=.o)"
>>> which
>>> need to be changed to "$(SOURCES:.cpp=.o)"
>>
> 
> that's what I did, after changing all .c to .cpp and CC to CXX it compiles.
> 
[...]
> that's right, if I replace .c with .cpp in clean method, make doesn't remove .cpp files anymore,
> but it still removes the .tcl files

that is why i said 'constructs _like_ "$(SOURCES:.c=.o)"' rather than
'replace all occurences of ".c=.o" with ".cpp=.o"'

you really should go through the _entire_ Makefile and search for all
".c" (indicating filename suffixes...so check the context) and replace
it with ".cpp".
there might be occurences of ".c" that are not related to filename
extensions so take care.

fgmasdr
IOhannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6dHV0ACgkQkX2Xpv6ydvRuyQCg6DnttMnTjXIAAZHfq2TCC7v+
p4gAoJmnGkR+31iy+c21CRRVRmmfU0Tw
=xdm+
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3636 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20111018/04c6fb15/attachment.bin>


More information about the Pd-dev mailing list