![]() |
#1 |
Swordsman
Join Date: May 2016
Posts: 330
![]() |
Makefiles
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 ![]() 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? |
![]() |
![]() |
![]() |
#2 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,592
Donated: $60
![]() |
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 ![]()
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
#3 |
Veteran
Join Date: Apr 2007
Posts: 1,947
Donated: $40
![]() |
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.
__________________
takkaria whispers something about options. -more- |
![]() |
![]() |
![]() |
#4 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,912
Donated: $40
![]() |
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 |
![]() |
![]() |
![]() |
#5 |
Swordsman
Join Date: May 2016
Posts: 330
![]() |
Finally! I've had some time to work on it. If anyone wants to test...
https://github.com/t4nk074/angband/b...ile.standalone Works for me ![]() 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? Last edited by t4nk; February 6, 2019 at 00:01. |
![]() |
![]() |
![]() |
#6 |
Swordsman
Join Date: May 2016
Posts: 330
![]() |
Indeed it doesn't! I thought without stuff like HAVE_DIRENT_H it wouldn't work (at least, not properly) but it works.
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Which main-xxx's and makefiles can I test with Cygwin or MinGW? | nppangband | Development | 2 | August 23, 2010 10:43 |
Windows Compiling and Makefiles | APWhite | Vanilla | 11 | August 22, 2007 22:22 |