Re: [cc65] Please critique this makefile

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-04-21 22:12:09
Hi,

> Instead of
>
> CSOURCES = sources/foo.c sources/bar.c sources/etc.c
> ASMSOUIRCES = sources/foo.s sources/bar.s sources/etc.s
>
> or something similar I would like to have only:
>
> SOURCEDIR = sources/
>
> and both types of source files are dynamically found

I see. At first sight this seems relatively easy to do. I'll check it out...

>> 2. Keep GNU make from knowing about the intermediate assembler files
>> by compiling and assembling C sources in a single make recipe and
>> deleting the intermediate assembler file right away.
>
> AFAIR that was the path I have taken but then things still didn't work as
> expected (dependencies). Since you replied, I think I shall have to get back
> to it. Maybe we can work something out!

Most of that approach is already implemented in the sample Makefile I
created for the cc65 docs. The sed command "s!.s:!.o:!" replaces the
.s file with .o file in the dependency file. So GNU make never knows
about the .s intermediate files...

> Yes, both types of sources the CC65 (as package) supports. But by
> "universal" I also mean that I can have the same Makefile for virtually all
> simple (or even not so simple but not requiring some non-cc65 tools) CC65
> projects, as long as I keep the project (directory) structure consistent.
>
> Something like:
>
> project/
>        |
>        + objects/
>        |
>        + resources/
>        |
>        - sources/
>
> I think this could set a standard starting point for CC65 projects.

I see. This "just do what I mean with everything present" approach
isn't exactly popular AFAIK but seems in fact appealing for the type
of projects we're talking about here.

Just one more question: What do you refer to with "resources"?

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Apr 21 22:12:31 2010

This archive was generated by hypermail 2.1.8 : 2010-04-21 22:12:33 CEST