Im with chuck on this one.
Working in an IDE is so much simpler than worrying about if I have all
the libraries and the correct engine to compile
all this done when the ide is opened.
However I do alot in linux and so long as you as you can do an install
of the make application then linux os will use the
source dependencies to locate all files necessary to install Make
correctly and for your OS being used.
If you go about it the long way trying to build from source it will
take much more knowledge of what all is needed to build it
correctly.
On 02/09/2018 10:36 AM, Bill Prince wrote:
A make file is just a list of dependencies, and what to do if the
dependency is met. Sort of: "If hello.c is newer than hello, then
compile it". It can be as simple as that, but can get a whole lot more
complicated if there are libraries and such. However, in the simple
case of your hello.c, I would put everything in the same directory. As
the project grows, you would move your source (*.c) files into a
"source" directory, and the binaries (*.bin) into a bin directory.
Then linking all the binaries would be dependent on the dates of those
file. So linking is dependent on the binaries, and the binaries are
dependent on the sources.
Make should be installed already.
bp
<part15sbs{at}gmail{dot}com>
On 2/9/2018 6:51 AM, ch...@wbmfg.com wrote:
I hate make files. I love IDEs.
Bought a raspberry PI and am playing with it a bit. So far I really
like it.
Started to write a program using a Geaney editor. Nice editor. Hit
the make button and I discovered it is really just a shell, that you
have to have a gcc make somewhere.
So, not being a linux hack, what folder should may source and other
project files be in?
Should the make file be there with it?
Can someone please be kind enough to send me two things:
1. hello.c source
void main {
printf(“hello world”);
}
(I probably don’t need that as It is right there in this email. But
I do need to put it in the proper folder name and associate it with
GCC presumably with the make file.
2) A make file that will allow that program to compile.
Did I say I hate make files?
I have downloaded example make files. It appears I need to change
some file names in them to match the file name of my source. But I
would like to make my Geany program be able to cause the make file to
be correct if I change the name of the project. Perhaps that is not
possible. One of my sons is trying to encourage me to put windows on
it and use visual C++. I don’t want to do that because this is a
simple bit banging project.
I don’t care where the object files go or what they are named.
If I want to include a .h file it will be in my source.
My handicap comes from TurboC coming on the scene when I first
started doing a bunch of c code writing. Before that it was asm
(before that it was fortran, pascal, basic)
--