PDA

View Full Version : not able to change Makefile



shamik
9th June 2007, 11:46
hii frenz,

I have in my project a .pro and a Makefile.
now to include necessary libraries i have to change the makefile and add the path to those libraries in it.

after adding the path to the Makefile i just save it and from the terminal i run the make tool. but then the changes that i had made recently dont appear to work. again when i open the makefile i cant see any of the changes which i made and the previous makefile which was there appears.
i am changing the makefile using the vi editor.
i also tried chmod 777 Makefile but still the changes disappear and the original makefile appears everytime.

its very necessary to include the libraries and their path in the Makefile without which it is not possible to compile the project.

please tell me what do i do so that the changes to the Makefile dont disappear.

Michiel
9th June 2007, 12:00
If you use qmake, a new makefile is automatically created for you each time. You can't alter the makefile by hand because the changes would just disappear.

Instead you have to put certain directives in the .pro file so that they are automatically included in the makefile each time.

This page explains how for Qt 4: http://doc.trolltech.com/4.0/qmake-project-files.html

I can't find the corresponding Qt 3 page. But I suspect it would work the same way.