NEWBIE: compilation trouble!!!

A

arenaTR

I'm trying to use the gcc compiler on Suse Linux 9.0 straight from the
command line. I'm a windows refugee, so please be gentle.

I have a bunch of c code with appropriate headers and a Makefile.in and a
Makefile.am. I'm really new to this, and having trouble undersatnding the
theory behind the compilation process, obviouisly affecting my ability to
get this to work.

I've tried:

make makefile.in
from the directory in which the files reside, getting the message
"nothing to be done" which I understand, since the makefile is supposed to
keep track of only those things that have changed.

make makefile.am
same thing as makefile.in

gcc makefile.in
"unrecognized file extension"

gcc cfile.c -main c file, although there are lots of others
Here I get lots of errors, all relating to not found/not declared
elements.

So, my assumption was that I could just "execute" a compile with the
makefile, which would control the process. This seems not to be the case,
or if it is, I can't seem to find out how.

Your help would be greatly appreciated. I've been reading for a few hours
on this and can't seem to get the answer.

Thanks again!
 
R

Rolf Magnus

arenaTR said:
I'm trying to use the gcc compiler on Suse Linux 9.0 straight from the
command line. I'm a windows refugee, so please be gentle.

I have a bunch of c code with appropriate headers and a Makefile.in
and a
Makefile.am. I'm really new to this, and having trouble undersatnding
the theory behind the compilation process, obviouisly affecting my
ability to get this to work.

Note that this newsgroup is about the C++ programming lnaguage and not
about any build tools. This question should have been asked in a un*x
programming newsgroup.
I've tried:

make makefile.in
from the directory in which the files reside, getting the message
"nothing to be done" which I understand, since the makefile is
supposed to keep track of only those things that have changed.

Makefile.in is not a Makefile. It's an input file from which a Makefile
is to be generated. Usually, you have a script called "configure" in
your source directory that generates the Makefile from Makefile.in
make makefile.am
same thing as makefile.in

Makefile.am is the file from which Makefile.in was generated by
automake.
gcc makefile.in
"unrecognized file extension"

gcc cfile.c -main c file, although there are lots of others
Here I get lots of errors, all relating to not found/not declared
elements.

So, my assumption was that I could just "execute" a compile with the
makefile, which would control the process. This seems not to be the
case, or if it is, I can't seem to find out how.

It is, but first, you have to get a makefile.
 
C

Chris Dams

Hello,

arenaTR said:
I have a bunch of c code with appropriate headers and a Makefile.in and a
Makefile.am. I'm really new to this, and having trouble undersatnding the
theory behind the compilation process, obviouisly affecting my ability to
get this to work.

This is not really on topic, but you might try just typing "make". Most
source code that you grab from the net comes with installation and/or
building instructions, however, so it might also help if this is available
from somewhere.

Good luck,
Chris Dams
 
S

someone

try
make -f makefile.in

Make assumes makefile or Makefile as default. Otherwise, you need to
specify -f option, as in your case.
 
P

peter.ludikovsky

arenaTR said:
I have a bunch of c code with appropriate headers and a Makefile.in and a
Makefile.am.
Is there also a file 'Makefile'? If no, make won't do anything.
Check if there is a file called 'configure'. Id so, call './configure --help'
or, to start straight away with the defaults './configure'
configure will take your system configuration and translate Makefile.in to
Makefile. After configure is done do make.

----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,270
Latest member
TopCryptoTwitterChannels_

Latest Threads

Top