Angband Forums

Angband Forums (
-   Development (
-   -   Makefiles (

t4nk January 30, 2019 21:37

So, Nick wanted a working Makefile.std...

First, what to do with autoconf.h? Is this the only header autoconf produces? I think a makefile shouldn't require autoconf.h (otherwise, why even bother). Presumably, all these macros (DEFAULT_CONFIG_PATH, HAVE_DIRENT_H, etc) should be defined in the makefile?

Second, "make depgen" is a pretty old school way to calculate dependencies, how about a more automated way? I used a pretty fancy (IMO :)) method for textui2 ( I don't think it can break Makefile.osx and (if I change it to work only on BASEOBJS, like does), but it might be just too fancy/obscure. Another option is to just copy "depend" stuff from
Anyway, I have never seen this method used by anyone else, so wanted to brag :)

Third - just curious - does Makefile.nmake even work? I think it shouldn't, we've already determined Angband can't be compiled with MSVC++. Curious about Makefile.nds too. At least this one looks like it might work...

So i guess I'm asking about autoconf.h... Is it the only thing that makes angband's binary dependent on configure?

Nick January 31, 2019 21:26

I think so?

I guess the intent here is for Makefile.std to be a thing that anyone building on a *nix system (including probably command line for Macs) can use with a decent chance of it working, even if it isn't as convenient as the regular build system. So you should do what you think best. If your fancy system works well, go ahead and use it - it would be a shame to let it go to waste, after all :)

takkaria February 2, 2019 11:27

Yeah I think it's a neater way to do it. The current method dates back many years now, when I think it was required for compatibility with, I don't know, maybe FreeBSD?

Also, Angband's binary shouldn't be reliant on autoconf.h... it never used to be and I don't think there's any code-level changes that make it so. Including autoconf.h should be guarded by #ifdef USE_AUTOCONF or whatever.

Pete Mack February 2, 2019 21:11

Yeah, the only reason to have autoconf is to include angband in linux distros and packages. It is a mysterious mechanism* that most people wouldn't want to touch. Makefile.std is much cleaner and should be easier to maintain.

* I believe that is a Steamband flavor

t4nk February 5, 2019 23:44

Finally! I've had some time to work on it. If anyone wants to test...
Works for me :) It's a makefile, though, chances are you'll need to edit linker and compiler flags.
I won't send a pull request just yet, I suspect it can still be improved*... Time to do some work on SDL2 port, this is more fun than writing makefiles anyway :)

* like, say, adding main-test.o? Forgot about it, although it doesn't seem all that useful...
Also main-stats.c. Hmm, I don't think anyone will actually use the makefile for that?

t4nk February 5, 2019 23:49


Originally Posted by takkaria (Post 135878)
Also, Angband's binary shouldn't be reliant on autoconf.h... it never used to be and I don't think there's any code-level changes that make it so.

Indeed it doesn't! I thought without stuff like HAVE_DIRENT_H it wouldn't work (at least, not properly) but it works.

All times are GMT +1. The time now is 17:59.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.