1820879 Members
5398 Online
109628 Solutions
New Discussion юеВ

How to use makefile

 
Scott Sabo
Frequent Advisor

How to use makefile

Can someone tell me how to use the makefile utility?

I have to take some source files for Socks5 stuff and "compile" it (I guess) to be able to make it run on my IA64.

Any ideas or reference materials?

Thanks a lot!

Scott
5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor

Re: How to use makefile

Hi Scott,

Generally the source files come with a configure script that you would need to run and that will generate the Makefile. Then you run 'make' and|or 'make install' to compile the binaries and install them under appropriate directories.

To generate a makefile for yourself based on the source code in the current working directory, run the command 'mkmf'. Look the man page for more details. You may have to modify the generated Makefile for successful compilation.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Richard Pereira_1
Regular Advisor

Re: How to use makefile

Scott,

It depends, there should have been a Readme or INSTALL file included with that src. From my linux experience, usually the Makefile is a reference for the 'make' utility.

On linux, you generally install like this

# cd /mysource
# make test
# make install

But it varies , the person who made the sources decides, check for that README or INSTALL file , or tell us where you got the src ?

Good Luck,
Richard
Scott Sabo
Frequent Advisor

Re: How to use makefile

Thank you. I'll take a look at the files that I was given and try to "make" some sense out of it.

Scott
Manish Srivastava
Trusted Contributor

Re: How to use makefile

Hi,

manpage of make is a good palce to start.
make utility helps you build applications which have several object files. The main use is that it rebuilds only those objects which have a source code change this reducing the build time etc.

makefile is the place where yu have all the rules defined to compile or build the objects.

There is a book by O'Reliy publication; the make utility, this is the best make reference material you will lay your hands on.

HTH
manish
Scott Sabo
Frequent Advisor

Re: How to use makefile

I got it running.

Thank you very much for your help.

Scott