Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 30, 2019, 21:37   #1
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
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 ) method for textui2 (https://github.com/takkaria/angband/...kefile.dep.ui2). I don't think it can break Makefile.osx and Makefile.win (if I change it to work only on BASEOBJS, like Makefile.inc does), but it might be just too fancy/obscure. Another option is to just copy "depend" stuff from buildsys.mk.
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?
t4nk is offline   Reply With Quote
Old January 31, 2019, 21:26   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
Nick will become famous soon enough
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.
Nick is offline   Reply With Quote
Old February 2, 2019, 11:27   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
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-
takkaria is offline   Reply With Quote
Old February 2, 2019, 21:11   #4
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,419
Donated: $40
Pete Mack is on a distinguished road
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
Pete Mack is offline   Reply With Quote
Old February 5, 2019, 23:44   #5
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
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 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?

Last edited by t4nk; February 6, 2019 at 00:01.
t4nk is offline   Reply With Quote
Old February 5, 2019, 23:49   #6
t4nk
Swordsman
 
Join Date: May 2016
Posts: 330
t4nk is on a distinguished road
Quote:
Originally Posted by takkaria View Post
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.
t4nk is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 13:09.


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