kubilus1 / gendev

Genesis development environment for Linux.
BSD 3-Clause "New" or "Revised" License
209 stars 23 forks source link

Makefile modifications to allow build on FreeBSD #37

Closed edenist closed 6 years ago

edenist commented 6 years ago

I've aimed to keep the changes incredibly simple, keeping things almost untouched and still a Linux-focused project.

As you can see, I've just modified the makefiles to use the $(MAKE) variable rather than the static make. Within sjasm39g6.zip I have added the following within the Makefile, as otherwise $(CXX) defaults to the clang c++ compiler and the build fails.

UNAME:=$(shell uname) ifeq ($(UNAME), FreeBSD) CXX = g++ endif

I added FreeBSD specific notes in the doc folder, along with a reference to this file in the main readme. I don't mind removing this if you do not like it.

I've tested the build successfully on FreeBSD 11.1. I have also performed and tested a successful build on a local Ubuntu 17.10 install as well as my own travis-ci which passed successfully.

kubilus1 commented 6 years ago

This looks good. Too bad Travis doesn't have a FreeBSD build OS option. Would be cool to build a package for users.

simonvannarath commented 6 years ago

For what its worth, I did similar modifications; basically the same as above but with additional variables to accommodate GNU tar and switching hardcoded references from gcc/g++ to enable building gendev with egcc/eg++ (GCC 4.9.4 from packages, the standard GCC system compiler is version 4.2.1 and does not build) resulting in successful builds on OpenBSD since version 6.0.

edenist commented 6 years ago

I was actually thinking the same thing [in regards to FreeBSD support in Travis] and stumbled across someone who put together a build script which installed qemu, emulated a FreeBSD install then SSH'd into the qemu system to carry on the build. Kludgy as all heck but creative nonetheless.

But I do agree it would be neat to have cross-platform package releases. I'll have a think about if this could feasibly be done.