[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Basic questions about makefile, e.g. what does @- mean
From: |
Greg Chicares |
Subject: |
Re: Basic questions about makefile, e.g. what does @- mean |
Date: |
Tue, 08 Feb 2011 06:08:33 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
On 2011-02-07 18:21Z, Marco wrote:
[snip makefile]
> I think the linking takes place on the following line:
>
> $(program_NAME): $(program_OBJS)
> $(LINK.cc) $(program_OBJS) -o $(program_NAME)
>
> Correct me if I'm wrong.
You're right.
> Where does the compiling take place?
It happens implicitly. See the "Catalogue of Implicit Rules" in the manual.
> What does the @- mean? @ means silent output as far as I know but @-?
A '@' prefix means "don't echo this command".
A '-' prefix means "don't stop if this command fails".
> Where can I specify compiling options, such as -Wall or -pedantic?
Use the CFLAGS and CXXFLAGS variables for C and C++ respectively. You can
add them to the makefile, e.g.
CFLAGS := -Wall -pedantic
or specify them on the command line when you invoke 'make', e.g.
make CFLAGS='-Wall -pedantic' all