[Simh] Here comes a new Makefile - please try it and enhance it!

Toby Thain toby at smartgames.ca
Thu Sep 18 12:23:58 EDT 2008


On 18-Sep-08, at 11:41 AM, Terry Newton wrote:

> Hello all,
>
> --- On Thu, 9/18/08, Philipp Hachtmann <hachti at hachti.de> wrote:
>
>> I have just written a new single Makefile. It's
>> attached to this message.
>>
>> The Makefile currently contains the module definitions for
>> H316,
>> Nova and Eclipse. There is also enough information to add
>> the rest.
>>
>> Someone should do it! It's simple!
>
> Sorry to chime in here on things I don't exactly understand...
> but perhaps that's the point! I took a look at the existing
> 3.8-0 makefile, and I CAN understand it, yet I don't
> understand this new makefile.
>
> The present makefile works perfectly for me under both Linux
> and Windows (called via the mingw batch), ...

There's no rule that a good Makefile is hard to read.

>
> Another thing is SimH needs to be compilable on practically
> any modern platform, with as few deviations (IFEQ etc) as
> possible, and with NO changes to the base source code.
> Doing fancy stuff is asking for problems,


A correct Makefile isn't 'fancy stuff'. It does not impact  
portability, nor is it any harder to customise than an incorrect  
Makefile.

In fact, it is often *helpful* in organising portable software.


> and requires
> extensive testing to make sure it works on ALL platforms.
> What about a mainframe using who-knows-what version of UNIX?


It is likely that GNU make will be required, since it's hard to write  
a good and simple Makefile without its sensible extensions and fixes.  
GNU make is bundled with OS X, Linux, *BSD, Solaris, Cygwin, mingw...

>
> I want to keep an open mind, so exactly what are the
> advantages of this new makefile over the present one?
>
>> # Here comes the weird generic stuff. Should be altered
>> VERY carefully only.
>
> ???? this is what I'm talking about. In the existing makefile
> I can quickly find what needs changing (if anything) and just
> do it, care (or even much understanding) is not required.

That's only a matter of organisation.

>
>> # Add the executable to the CLEANSTUFF list
>>
>> CLEANSTUFF+=$$(TARGET_DIR)/$$($(1)_EXEC)$$(EXEC_SUFFIX)
>
> ???? a make clean is supposed to remove the extra objects,
> NOT the EXE's, those are the things I want to keep :-)

'clean' conventionally removes derived files including EXEs. If you  
want to keep them, don't 'clean'; with a correct Makefile (as opposed  
to recursive hackery) you should rarely, if ever, need to 'clean'.

--Toby


>
> Regarding SimH hacks,...
> Terry
>
>
>
>
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh




More information about the Simh mailing list