-
Notifications
You must be signed in to change notification settings - Fork 14
convert to a Makefile #1
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
base: master
Are you sure you want to change the base?
Conversation
doesn't even work on FreeBSD)
|
I agree with using a Makefile, but the given Makefile is needlessly verbose. You should make use of the features of |
|
Significantly less verbose Makefile: http://pastie.org/4695846 (the /usr/local things should be optional too, since the compiler should have all sources set up, unless they are not set up properly on FreeBSD, which is why I left them in, since they were in the original). |
|
.PHONY: clean is the GNU make version; The makefile I gave above should be portable to both GNU and BSD and other POSIX make systems. Since this isn't a large project using the "nicer" features isn't needed. |
|
The implicit targets are definitely in POSIX, which was the real point of my change. Sorry for my errors there. I should know better. |
|
Wow! I should have known better given that I work with POSIX and make on a daily basis. Thank you for enlightening me. I agree with the standard part of your changes then. I'll try to commit them and add them to the pull request unless kmcallister gets to it first :) |
|
Hmm, I think the controversy over what kind of Makefile to have vindicates my opinion that using Anyway, I pushed changes which should fix the build on FreeBSD, and allow the user to override the choice of C compiler using
To be honest, I'm not that interested in packaging This is just a matter of laziness on my part. If someone else wants to take |
|
What controversy? The original was fine but verbose, then I made a mistake, I got corrected, done. Controversy should involve more disagreeing ;) |
|
I also wrote a Makefile, for my own building purposes. It uses GNU make extensions. git://github.com/barak/taralli commit 834a421. As an overall note: there is no particular technical reason not to have both build.sh and Makefile |
|
I actually ran into: until I re-ordered the link arguments in the shell script like so: diff --git a/build.sh b/build.sh
index 71d6bea..10c0b00 100755
--- a/build.sh
+++ b/build.sh
@@ -14,5 +14,5 @@ fi
set -xe
${CC:-cc} -O2 -Wall -std=c99 -pedantic \
- -I/usr/local/include -L/usr/local/lib -lX11 -lXi \
- -o taralli_$1 main.c map_$1.c
+ -I/usr/local/include -L/usr/local/lib \
+ -o taralli_$1 main.c -lX11 -lXi map_$1.cin Ubuntu 12.04 See: http://stackoverflow.com/questions/8984408/linker-problems-in-ubuntu-11-10 |
No description provided.