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

Philipp Hachtmann hachti at hachti.de
Thu Sep 18 09:12:13 EDT 2008


Hi everybody,

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!

Keep in mind that the simulator's source directory is automatically used
as include directory.

The file works with lower case directory names! I hate those UPPERCASE
NAMES in the SIMH distribution. If anyone things the names have to stay
UPPERCASE, please change the three words in the Makefile.

Kevin Handy schrieb:
> In rewriting the Makefile, be careful about handling
> the command line options that vary between simulators
> for the same source files, i.e. -DECLIPSE, -DUSE_INT64,
> and others.
I have taken care of that. The Makefile supports compiling the same
source files with different CFLAGS into different directories and
then building different applications with different LDFLAGS from them
:-) :-) :-)

> FYI: The current makefile looks a lot like a batch file,
> because it started out as a batch file.
I was too shy to publish that assumption :-)

> It might make sense to use autoconf/automake to
> handle all the system dependent stuff and the
> multiple objects due to -D stuff. Things like 64 bit
> file systems, networking, threads, etc.. I don't
> think autoconf works under windows, unless you
> run it under cygwin, so a regular makefile will
> also be necessary.
I don't know how to use autoconf...

Just tried to understand the ifeqs in the beginning.
A better way to set the CC, CFLAGS and LDFLAGS for the build must
still be found.

I tested the Makefile only under Linux.

If you modify the file, please send me a patch, so I can keep track of
changes.

In the head of the Makefile, I first try to figure out for what we are
building, setting the variable BUILD.

Then, in another step, I set the global build variables according to the
system mentioned in the BUILD variable.

So please keep that schema as long there is no completely new approach
to the issue: If you have another way to detect the system, put it into
the first section. If you want to change settings for a particular
system, change them in the second section. Don't hesitate to create new
systems. I ***HATE*** those annoying complex "ifeq else ifeq"
constructs. They grow and tend to become completely obscure...

Best wishes and good night,

Philipp :-)



> 
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh

-- 
http://www.hachti.de

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20080918/d62a9439/attachment-0003.ksh>


More information about the Simh mailing list