Re: [cc65] automatic generation of makefile dependencies

From: <silverdr1wfmh.org.pl>
Date: 2011-04-24 20:35:22
On 2011-04-24, at 17:09, thefox xofeht wrote:

> However, I tried adapting the Makefile to my NES project and noticed a
> couple of things:

It certainly hasn't been tested against all possible use cases, so  
every feedback is very much appreciated!

> 1) I need to link an external library in, but wasn't able to do this
> by modifying LDFLAGS (foo.lib needs to come after all the object files
> when linking). I fixed this by moving the $(LDFLAGS) to the end of
> this line:
>
> $(PROGRAM): $(OBJECTS)
> 	$(CC) -t $(TARGETS) -o $@ $^ $(LDFLAGS)

One of the reasons why I am "allergic" to forced options order... ;-)

> 2) You might want to add a build option for generating a debug file
> (--dbgfile switch for linker). This should do the trick:
>
> # Linker flags for generating a debug file
> define _dbgfile_
>  LDFLAGS += -Wl --dbgfile,$$@.dbg
>  REMOVES += $(PROGRAM).dbg
> endef

Looks like nice to have - shall check that.

Thanks.
-- 
SD!
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Apr 24 20:35:34 2011

This archive was generated by hypermail 2.1.8 : 2011-04-24 20:35:38 CEST