Re: [cc65] automatic generation of makefile dependencies

From: thefox xofeht <>
Date: 2011-04-24 17:09:40
On Sun, Apr 24, 2011 at 4:28 PM, Oliver Schmidt <> wrote:

Thanks Oliver & silverdr, this is exactly what I needed!

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

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:

	$(CC) -t $(TARGETS) -o $@ $^ $(LDFLAGS)

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

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Apr 24 17:09:55 2011

This archive was generated by hypermail 2.1.8 : 2011-04-24 17:09:58 CEST