savannah-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-help-public] [sr #105544] Selecting an alternative compiler fo


From: Stephan Peijnik
Subject: [Savannah-help-public] [sr #105544] Selecting an alternative compiler for "make" to use.
Date: Thu, 7 Sep 2006 17:28:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-3)

Update of sr #105544 (project administration):

                Priority:              5 - Normal => 1 - Later              
                Severity:           4 - Important => 3 - Normal             
                  Status:                    None => Invalid                
             Assigned to:                    None => sp                     
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Hi!

Let's start with a quick note: the GNU Savannah support system is actually
meant for GNU Savannah related issues and not for GNU/Linux or similar
problems.
However, I'll still answer your question. Next time please don't file a
support request here when looking for an answer to such a question.

Okay, now let's give you an answer:

As you said, you tried setting the CC variable in your makefile, without any
luck though. The reason for this is that setting a variable in a makefile
works pretty much the same way setting variables in shell scripts work.
So, after setting the CC variable you can 'access' it using ${CC}. This way
${CC} will be replaced with the value of the CC variable when parsing the
makefile.

So, adapted to your makefile it would look like this:

CC=/path/to/your/gcc

hello : hello.o
${CC} -o hello.c hello.o

hello.o : hello.c
${CC} -c hello.c

clean :
rm hello hello.o

Don't forget to not simply copy&paste this snippted but to add tabs again.

Regards.

PS: I've closed this support request. If you do have any other questions not
related to GNU Savannah please do not use this support request system. If you
do have other specific GNU make related 'problems', please refer to the GNU
make manual which can be found at
http://www.gnu.org/software/make/manual/make.html.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?105544>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]