Skip to content

Generalize Makefile.Linux a little bit, add FreeBSD support #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kevans91
Copy link

Hi =)

Please consider this a spiritual successor to #82, I think @DianeBruce will find this agreeable. My changes should result in no functional difference, and here's what I did:

  1. Add a separate PREFIX variable, set to /usr, that you may consider the "data prefix," given installation uses a separate variable. On Linux systems, /usr is generally accurate, but on *BSDs /usr is still base system things and all of the uses of /usr here are things that would actually reside in /usr/local.
  2. Make many of the variables able to be overwritten, so we can do so in the environment as we need to.
  3. Use ${CC} in a couple of more places that can be generalized -- these invocations generally work with clang, too, so this is nice
  4. Rename INSTALLDIR to DESTDIR, as the latter is fairly common and a GNU standard for staged installs for what it's worth
  5. Added INSTALL_{PROGRAM,SCRIPT,DATA,MAN} variables that build off of ${INSTALL} to abstract away permission and argument details being passed to install(1) -- this allows you to focus more on what kind of thing you're installing, rather than permissions. It also allows other systems to replace GNU install(1) arguments with their own.

Additionally, in the name of FreeBSD support, don't look at /proc/cpuinfo directly on a FreeBSD system but instead allow us to just pass in a variable to indicate whether we support NEON or not.

I wasn't able to test this on a GNU/Linux system, but I've tested it with GNU make(1) and it worked as expected there. I expect no issues on GNU/Linux since most of it was string replacements and s/:=/?=/

Thank you for your time,

Kyle Evans

@kevans91
Copy link
Author

Spiritual successor for the Makefile bits, at least. =)

@kevans91
Copy link
Author

kevans91 commented May 6, 2017

Poke @wb2osz; it no longer applies cleanly, but any thoughts on the diff? I'll rebase it if you're inclined to pull this. =)

@rich0
Copy link

rich0 commented Sep 17, 2017

This desperately needs merging - I'm packaging this and I'm basically going to end up re-inventing this. My only comment is that you can do a bit more:

There are a group of installs around this line:
$(INSTALL_DATA) tocalls.txt /usr/share/direwolf/tocalls.txt

These should have /usr replaced with $(DESTDIR).

@dranch
Copy link
Collaborator

dranch commented Sep 18, 2017

I've sent in some patches to John some time ago but he hasn't integrated them. Here is what I recommend to use:

http://www.trinityos.com/HAM/CentosDigitalModes/usr/src/redhat/SOURCES/direwolf-1.4-makefile.patch

@kevans91
Copy link
Author

@dranch It'd be nice if your install(1) invocations were redefinable to make them usable for different install(1) implementations (or non-install(1) implementations)

@wb2osz
Copy link
Owner

wb2osz commented Jul 8, 2019

The "dev" branch now contains a combination of #92 and #191 for better BSD support. Rather than adding yet another Makefile, more conditions were added to Makefile.linux to reduce future maintenance effort.

@wb2osz
Copy link
Owner

wb2osz commented Nov 24, 2019

No longer applicable. The 'dev' branch is now using cmake.

@wb2osz wb2osz closed this Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants