Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

src/Makefile bugs and fixes

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
maqifrnswa
Member
Member
Posts: 11
Joined: October 20th, 2009, 8:05 pm
Name: Scott

src/Makefile bugs and fixes

Post by maqifrnswa »

Hello, I've been packaging Sandbox for inclusion in Debian non-free and redistribution in other distributions such as Ubuntu and Edubuntu. This is a very nifty piece of software I've enjoyed playing with while working on it! I've come across some src/Makefile bugs which could be easily fixed:

The first is a typo in the target clean:

Code: Select all

-$(RM) $(SERVER_OBJS) $(CLIENT_PCH) $(CLIENT_OBJS) $(SSPCLIENT_OBJS) $(FPSCLIENT_OBJS) $(LAUNCHER_OBJS) $(MASTER_OBJS) $(PLATFORM_PREFIX)_server_* $(PLATFORM_PREFIX)_client_*
is missing $(RPGCLIENT_OBJS) it should be:

Code: Select all

-$(RM) $(SERVER_OBJS) $(CLIENT_PCH) $(CLIENT_OBJS) $(SSPCLIENT_OBJS) $(FPSCLIENT_OBJS) $(RPGCLIENT_OBJS) $(LAUNCHER_OBJS) $(MASTER_OBJS) $(PLATFORM_PREFIX)_server_* $(PLATFORM_PREFIX)_client_*


In all the enet targets you are not using Autotools but instead generating your own configure file. I think you should add autotools to the list of things the build depends on and let the src/Makefile make enet's build configurations using autotools (this is useful for letting more architectures use the program). To do that, you can change the following targets in src/Makefile:

Code: Select all

clean-enet: enet/Makefile
	$(MAKE) -C enet/ clean
should be changed to:

Code: Select all

clean-enet:
	[ ! -f enet/Makefile ] || $(MAKE) -C enet clean
	rm -f enet/config.guess enet/config.log enet/config.sub
	rm -f enet/configure enet/config.status
	rm -f enet/Makefile enet/include/Makefile enet/include/enet/Makefile
	rm -f enet/Makefile.in enet/include/Makefile.in
	rm -f enet/aclocal.m4 enet/enet.dsp
	-rm -r enet/autom4te.cache
	-rm enet/include/enet/Makefile.in
	-rm -r enet/.deps

and the following target should be changed:

Code: Select all

enet/Makefile:
	cd enet; ./configure
to:

Code: Select all

enet/Makefile:
	cd enet; aclocal && automake -a -c --foreign && autoconf
	cd enet; ./configure

and then your clean target could now be even "cleaner!" by adding "clean-enet" as the prerequesit to the clean target:

Code: Select all

clean: clean-enet
	-$(RM) $(SERVER_OBJS) $(CLIENT_PCH) $(CLIENT_OBJS) $(SSPCLIENT_OBJS) $(FPSCLIENT_OBJS) $(RPGCLIENT_OBJS) $(LAUNCHER_OBJS) $(MASTER_OBJS) $(PLATFORM_PREFIX)_server_* $(PLATFORM_PREFIX)_client_*

If you have any other questions, PM me
Last edited by maqifrnswa on October 21st, 2009, 9:58 am, edited 2 times in total.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: src/Makefile bugs and fixes

Post by Hirato »

thanks for pointing out the typo at the top
I'll pass the notes on enet over to Lee, no guarantees that anything will happen on that front
This is not a url, clicking it is pointless
maqifrnswa
Member
Member
Posts: 11
Joined: October 20th, 2009, 8:05 pm
Name: Scott

Re: src/Makefile bugs and fixes

Post by maqifrnswa »

Thanks - no problem, I understand it's a complicated issue with the number of platforms you support.
User avatar
Obsidian
Former Staff
Posts: 454
Joined: May 24th, 2009, 1:52 pm
IRC Username: Katana
Contact:

Re: src/Makefile bugs and fixes

Post by Obsidian »

I've tossed this into the bug tracker so that the nub team...err, I mean, developers can keep track of this. Tracker ticket that was opened is here: tracker.php?p=3&t=26

I expect to hear Hirato complaining to me about him receiving emails from the tracker any time now. :lol:
うるさいうるさいうるさい!

github: https://github.com/damianb/
Locked